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:
@@ -596,7 +596,7 @@ const std::string &Camera::id() const
|
||||
|
||||
Camera::Camera(PipelineHandler *pipe, const std::string &id,
|
||||
const std::set<Stream *> &streams)
|
||||
: Extensible(new Private(pipe, id, streams))
|
||||
: Extensible(std::make_unique<Private>(pipe, id, streams))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user