summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-01-15 15:32:59 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-01-16 18:23:43 +0200
commit62eae99ed29ddba069068944f823332b9ca30c4e (patch)
tree6256732231d6fe1cd7fa693484b089a25e3623c0 /include
parenta2f095947f847cb7d3f058a74514109928b1df9f (diff)
libcamera: camera_manager: Turn enumerator into a unique_ptr<>
Convey the fact that the CameraManager class owns the DeviceEnumerator instance it creates by using std::unique_ptr<> to store the pointer. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/camera_manager.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/libcamera/camera_manager.h b/include/libcamera/camera_manager.h
index 15e7c162..6cfcba3c 100644
--- a/include/libcamera/camera_manager.h
+++ b/include/libcamera/camera_manager.h
@@ -7,6 +7,7 @@
#ifndef __LIBCAMERA_CAMERA_MANAGER_H__
#define __LIBCAMERA_CAMERA_MANAGER_H__
+#include <memory>
#include <string>
#include <vector>
@@ -37,7 +38,7 @@ private:
void operator=(const CameraManager &) = delete;
~CameraManager();
- DeviceEnumerator *enumerator_;
+ std::unique_ptr<DeviceEnumerator> enumerator_;
std::vector<PipelineHandler *> pipes_;
EventDispatcher *dispatcher_;