From 9538ce4cc65af347f457dee52ae6344119cc0be2 Mon Sep 17 00:00:00 2001 From: Hirokazu Honda Date: Wed, 24 Mar 2021 16:07:53 +0900 Subject: android: CameraDevice: Take shared_ptr in constructor CameraDevice takes the ownership of Camera. Therefore, shared_ptr would rather be used than const shared_ptr&. Signed-off-by: Hirokazu Honda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/android/camera_device.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/android/camera_device.h') diff --git a/src/android/camera_device.h b/src/android/camera_device.h index 8be7f305..555b33e7 100644 --- a/src/android/camera_device.h +++ b/src/android/camera_device.h @@ -33,7 +33,7 @@ class CameraDevice : protected libcamera::Loggable { public: static std::unique_ptr create(unsigned int id, - const std::shared_ptr &cam); + std::shared_ptr cam); ~CameraDevice(); int initialize(); @@ -66,7 +66,7 @@ protected: std::string logPrefix() const override; private: - CameraDevice(unsigned int id, const std::shared_ptr &camera); + CameraDevice(unsigned int id, std::shared_ptr camera); struct Camera3RequestDescriptor { Camera3RequestDescriptor(libcamera::Camera *camera, -- cgit v1.2.1