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:
@@ -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_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user