diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-01-17 16:23:25 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-01-21 11:13:53 +0200 |
commit | 21ff749a790386f87e767a690c77948a6474ceaa (patch) | |
tree | b50d8edf0846336f5cf85f69fe653fa32c695059 /test | |
parent | f3695e9b09ce4a88d6e0480d9e5058673af34a49 (diff) |
libcamera: camera: Handle camera objects through shared pointers
The Camera class is explicitly reference-counted to manage the lifetime
of camera objects. Replace this open-coded implementation with usage of
the std::shared_ptr<> class.
This API change prevents pipeline handlers from subclassing the Camera
class. This isn't deemed to be an issue. Mark the class final to make
this explicit.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'test')
-rw-r--r-- | test/list-cameras.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/list-cameras.cpp b/test/list-cameras.cpp index fdbbda09..070cbf2b 100644 --- a/test/list-cameras.cpp +++ b/test/list-cameras.cpp @@ -30,7 +30,7 @@ protected: { unsigned int count = 0; - for (Camera *camera : cm->cameras()) { + for (const std::shared_ptr<Camera> &camera : cm->cameras()) { cout << "- " << camera->name() << endl; count++; } |