mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 23:39:44 +03:00
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:
parent
83c5a2a7aa
commit
640f48d603
11 changed files with 32 additions and 26 deletions
|
@ -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_;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue