libcamera: base: extensible: Pass private pointer as unique_ptr<>
The Extensible constructor takes a pointer to a Private instance, whose lifetime it then manages. Make this explicit in the API by passing the pointer as a std::unique_ptr<Private>. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
@@ -32,7 +32,7 @@ public:
|
||||
|
||||
#define PUBLIC_CAMERA_BUFFER_IMPLEMENTATION \
|
||||
CameraBuffer::CameraBuffer(buffer_handle_t camera3Buffer, int flags) \
|
||||
: Extensible(new Private(this, camera3Buffer, flags)) \
|
||||
: Extensible(std::make_unique<Private>(this, camera3Buffer, flags)) \
|
||||
{ \
|
||||
} \
|
||||
CameraBuffer::~CameraBuffer() \
|
||||
|
||||
@@ -341,7 +341,7 @@ int CameraHalConfig::Private::parseConfigFile(FILE *fh,
|
||||
}
|
||||
|
||||
CameraHalConfig::CameraHalConfig()
|
||||
: Extensible(new Private()), exists_(false), valid_(false)
|
||||
: Extensible(std::make_unique<Private>()), exists_(false), valid_(false)
|
||||
{
|
||||
parseConfigurationFile();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user