[libcamera-devel] [PATCH] FrameBufferAllocator: fix non-copyability
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Fri Sep 25 16:07:33 CEST 2020
Hi Tomi,
Thank you for the patch.
On Fri, Sep 25, 2020 at 05:05:25PM +0300, Tomi Valkeinen wrote:
> FrameBufferAllocator is supposed to delete copy constructor and
> copy-assignment operator. It doesn't do that as it uses Camera as a
> parameter instead of FrameBufferAllocator.
Oops... Good catch.
It's a shame we can't have unit tests whose compilation failure would
indicate success, to catch issues like these.
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen at iki.fi>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
> include/libcamera/framebuffer_allocator.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/libcamera/framebuffer_allocator.h b/include/libcamera/framebuffer_allocator.h
> index 78f1353..a96aaea 100644
> --- a/include/libcamera/framebuffer_allocator.h
> +++ b/include/libcamera/framebuffer_allocator.h
> @@ -21,8 +21,8 @@ class FrameBufferAllocator
> {
> public:
> FrameBufferAllocator(std::shared_ptr<Camera> camera);
> - FrameBufferAllocator(const Camera &) = delete;
> - FrameBufferAllocator &operator=(const Camera &) = delete;
> + FrameBufferAllocator(const FrameBufferAllocator &) = delete;
> + FrameBufferAllocator &operator=(const FrameBufferAllocator &) = delete;
>
> ~FrameBufferAllocator();
>
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list