From 326e0aa834487dd50610c0ff0423acc48d7b2298 Mon Sep 17 00:00:00 2001 From: Umang Jain Date: Fri, 11 Oct 2024 14:52:20 +0530 Subject: libcamera: rkisp1: Use const reference for sensor configuration User-provided sensor configuration is never meant to be altered, hence pass SensorConfiguration by `const` reference in RkISP1Path::validate(). Signed-off-by: Umang Jain Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi --- src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 2 +- src/libcamera/pipeline/rkisp1/rkisp1_path.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp index 1999094e..4a3b779c 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp @@ -253,7 +253,7 @@ RkISP1Path::generateConfiguration(const CameraSensor *sensor, const Size &size, CameraConfiguration::Status RkISP1Path::validate(const CameraSensor *sensor, - std::optional &sensorConfig, + const std::optional &sensorConfig, StreamConfiguration *cfg) { const std::vector &mbusCodes = sensor->mbusCodes(); diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h index ce9a5666..8461071f 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h @@ -45,7 +45,7 @@ public: const Size &resolution, StreamRole role); CameraConfiguration::Status validate(const CameraSensor *sensor, - std::optional &sensorConfig, + const std::optional &sensorConfig, StreamConfiguration *cfg); int configure(const StreamConfiguration &config, -- cgit v1.2.1