diff options
author | Barnabás Pőcze <pobrn@protonmail.com> | 2024-03-10 14:30:33 +0000 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2024-03-12 10:09:56 +0000 |
commit | 443734023c1c953a3e4d0f3404b0d054f2449d99 (patch) | |
tree | d86b495e44a43db0f382dfe4c00549ec33d0a64a | |
parent | 01935edbba586df820db002671da7bd0a348ad8e (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>
-rw-r--r-- | src/libcamera/framebuffer_allocator.cpp | 2 |
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)) { } |