summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBarnabás Pőcze <pobrn@protonmail.com>2024-03-10 14:30:33 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2024-03-12 10:09:56 +0000
commit443734023c1c953a3e4d0f3404b0d054f2449d99 (patch)
treed86b495e44a43db0f382dfe4c00549ec33d0a64a /src
parent01935edbba586df820db002671da7bd0a348ad8e (diff)
libcamera: framebuffer_allocator: Move from argument in constructor
The single argument, of type `std::shared_ptr<Camera>`, 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 <pobrn@protonmail.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/framebuffer_allocator.cpp2
1 files changed, 1 insertions, 1 deletions
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)
+ : camera_(std::move(camera))
{
}