[libcamera-devel] [PATCH 2/5] libcamera: buffer: Utilise DELETE_COPY_MOVE_AND_ASSIGN
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Fri Oct 23 06:24:34 CEST 2020
Hi Kieran,
Thank you for the patch.
On Thu, Oct 22, 2020 at 02:56:02PM +0100, Kieran Bingham wrote:
> Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
> include/libcamera/buffer.h | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h
> index a26c8927d37a..42a20a387781 100644
> --- a/include/libcamera/buffer.h
> +++ b/include/libcamera/buffer.h
> @@ -10,6 +10,7 @@
> #include <stdint.h>
> #include <vector>
>
> +#include <libcamera/class.h>
> #include <libcamera/file_descriptor.h>
>
> namespace libcamera {
> @@ -43,12 +44,6 @@ public:
>
> FrameBuffer(const std::vector<Plane> &planes, unsigned int cookie = 0);
>
> - FrameBuffer(const FrameBuffer &) = delete;
> - FrameBuffer(FrameBuffer &&) = delete;
> -
> - FrameBuffer &operator=(const FrameBuffer &) = delete;
> - FrameBuffer &operator=(FrameBuffer &&) = delete;
> -
> const std::vector<Plane> &planes() const { return planes_; }
>
> Request *request() const { return request_; }
> @@ -57,7 +52,10 @@ public:
>
> unsigned int cookie() const { return cookie_; }
> void setCookie(unsigned int cookie) { cookie_ = cookie; }
> +
> private:
> + DELETE_COPY_MOVE_AND_ASSIGN(FrameBuffer);
> +
> friend class Request; /* Needed to update request_. */
> friend class V4L2VideoDevice; /* Needed to update metadata_. */
>
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list