diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-08-11 19:34:44 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-08-16 23:57:27 +0300 |
commit | e77c8951e9ff91bf2bacf81791a882ccb3cee30b (patch) | |
tree | ac66ba86468ae1aa5ad619c5fb276687aee65677 /src/libcamera/framebuffer.cpp | |
parent | 5420e359f2416f6d290eea626dddb3a881dd900c (diff) |
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>
Diffstat (limited to 'src/libcamera/framebuffer.cpp')
-rw-r--r-- | src/libcamera/framebuffer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcamera/framebuffer.cpp b/src/libcamera/framebuffer.cpp index 42c73134..b401c50e 100644 --- a/src/libcamera/framebuffer.cpp +++ b/src/libcamera/framebuffer.cpp @@ -181,7 +181,8 @@ FrameBuffer::Private::Private() * \param[in] cookie Cookie */ FrameBuffer::FrameBuffer(const std::vector<Plane> &planes, unsigned int cookie) - : Extensible(new Private()), planes_(planes), cookie_(cookie) + : Extensible(std::make_unique<Private>()), planes_(planes), + cookie_(cookie) { } |