diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-09-21 04:05:16 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-10-28 04:10:18 +0200 |
commit | b86356feee1cbdb7c64f1bee830aaa54c1b38af0 (patch) | |
tree | 119edc00784e295f315fc456dde7c401a7da3126 /src | |
parent | 8e42c2feb7ff7c350ffbbf97dd963dfd54e21faa (diff) |
libcamera: camera_manager: Make CameraManager::Private::mutex_ mutable
The mutex_ stored in the CameraManager::Private class is used to protect
members that may need to be accessed from const functions. Make it
mutable to allow this.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/camera_manager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp index 81785f91..3fef6963 100644 --- a/src/libcamera/camera_manager.cpp +++ b/src/libcamera/camera_manager.cpp @@ -50,7 +50,7 @@ public: * - initialized_ and status_ during initialization * - cameras_ and camerasByDevnum_ after initialization */ - Mutex mutex_; + mutable Mutex mutex_; std::vector<std::shared_ptr<Camera>> cameras_; std::map<dev_t, std::weak_ptr<Camera>> camerasByDevnum_; |