From 030c8f1a7ea5e58e2a155b2fda19c6a72ccb310f Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 19 Oct 2021 17:17:52 +0530 Subject: android: camera_request: Turn struct into a class The Camera3RequestDescriptor structure is growing into an object with member functions. Turn it into a class, uninline the destructor to reduce code size, explicitly disable copy as requests are not copyable, and delete the default constructor to force all instances to be fully constructed. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Hirokazu Honda Signed-off-by: Umang Jain --- src/android/camera_request.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/android/camera_request.cpp') diff --git a/src/android/camera_request.cpp b/src/android/camera_request.cpp index 93e546bf..16a632b3 100644 --- a/src/android/camera_request.cpp +++ b/src/android/camera_request.cpp @@ -10,10 +10,10 @@ using namespace libcamera; /* - * \struct Camera3RequestDescriptor + * \class Camera3RequestDescriptor * - * A utility structure that groups information about a capture request to be - * later re-used at request complete time to notify the framework. + * A utility class that groups information about a capture request to be later + * reused at request complete time to notify the framework. */ Camera3RequestDescriptor::Camera3RequestDescriptor( @@ -43,3 +43,5 @@ Camera3RequestDescriptor::Camera3RequestDescriptor( request_ = std::make_unique(camera, reinterpret_cast(this)); } + +Camera3RequestDescriptor::~Camera3RequestDescriptor() = default; -- cgit v1.2.1