libcamera: Utilise LIBCAMERA_DISABLE_COPY

Replace existing use cases where the copy constructor and copy
assignment operator are deleted with the LIBCAMERA_DISABLE_COPY
statement

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Kieran Bingham 2020-10-22 14:12:26 +01:00
parent 83c5a2a7aa
commit 640f48d603
11 changed files with 32 additions and 26 deletions

View file

@ -11,6 +11,8 @@
#include <memory>
#include <vector>
#include <libcamera/class.h>
namespace libcamera {
class Camera;
@ -21,9 +23,6 @@ class FrameBufferAllocator
{
public:
FrameBufferAllocator(std::shared_ptr<Camera> camera);
FrameBufferAllocator(const FrameBufferAllocator &) = delete;
FrameBufferAllocator &operator=(const FrameBufferAllocator &) = delete;
~FrameBufferAllocator();
int allocate(Stream *stream);
@ -33,6 +32,8 @@ public:
const std::vector<std::unique_ptr<FrameBuffer>> &buffers(Stream *stream) const;
private:
LIBCAMERA_DISABLE_COPY(FrameBufferAllocator)
std::shared_ptr<Camera> camera_;
std::map<Stream *, std::vector<std::unique_ptr<FrameBuffer>>> buffers_;
};