diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-08-06 14:37:56 +0200 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-08-16 13:50:03 +0200 |
commit | 54ca46968a18ab938fc61f9424f421a004f50405 (patch) | |
tree | 547be52362214bb9611576a59f5dbacd6a5f58f0 | |
parent | 0b9d8eb265a16a0dda650700759066b714f8fd0c (diff) |
libcamera: camera: Mark controls() and properties() as const operations
Reading the controls and properties does not modify the camera's state
and can be marked as const operations.
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r-- | include/libcamera/camera.h | 4 | ||||
-rw-r--r-- | src/libcamera/camera.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h index 48d88d64..272c12c3 100644 --- a/include/libcamera/camera.h +++ b/include/libcamera/camera.h @@ -86,8 +86,8 @@ public: int acquire(); int release(); - const ControlInfoMap &controls(); - const ControlList &properties(); + const ControlInfoMap &controls() const; + const ControlList &properties() const; const std::set<Stream *> &streams() const; std::unique_ptr<CameraConfiguration> generateConfiguration(const StreamRoles &roles = {}); diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index afdd4775..4a9c19c3 100644 --- a/src/libcamera/camera.cpp +++ b/src/libcamera/camera.cpp @@ -658,7 +658,7 @@ int Camera::release() * * \return A ControlInfoMap listing the controls supported by the camera */ -const ControlInfoMap &Camera::controls() +const ControlInfoMap &Camera::controls() const { return p_->pipe_->controls(this); } @@ -671,7 +671,7 @@ const ControlInfoMap &Camera::controls() * * \return A ControlList of properties supported by the camera */ -const ControlList &Camera::properties() +const ControlList &Camera::properties() const { return p_->pipe_->properties(this); } |