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>
This commit is contained in:
Barnabás Pőcze
2024-03-10 14:30:33 +00:00
committed by Kieran Bingham
parent 01935edbba
commit 443734023c

View File

@@ -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))
{
}