From 443734023c1c953a3e4d0f3404b0d054f2449d99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Sun, 10 Mar 2024 14:30:33 +0000 Subject: libcamera: framebuffer_allocator: Move from argument in constructor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The single argument, of type `std::shared_ptr`, is passed by value, so it can simply be moved from in order to avoid calling the copy constructor. Signed-off-by: Barnabás Pőcze Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi Signed-off-by: Kieran Bingham --- src/libcamera/framebuffer_allocator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/libcamera/framebuffer_allocator.cpp b/src/libcamera/framebuffer_allocator.cpp index 94389735..8cf45ab2 100644 --- a/src/libcamera/framebuffer_allocator.cpp +++ b/src/libcamera/framebuffer_allocator.cpp @@ -59,7 +59,7 @@ LOG_DEFINE_CATEGORY(Allocator) * \param[in] camera The camera */ FrameBufferAllocator::FrameBufferAllocator(std::shared_ptr camera) - : camera_(camera) + : camera_(std::move(camera)) { } -- cgit v1.2.1