From f2734ff3ab09d3ab78321daf61d18cb628da2b98 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Date: Sat, 22 Aug 2020 17:23:37 +0300 Subject: libcamera: Replace utils::clamp() with std::clamp() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that libcamera uses C++17, the C++ standard library provides std::clamp(). Drop our custom utils::clamp() function. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> --- src/ipa/rkisp1/rkisp1.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/ipa/rkisp1') diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 4bb16273..3a1c50c4 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -24,7 +24,6 @@ #include <libipa/ipa_interface_wrapper.h> #include "libcamera/internal/log.h" -#include "libcamera/internal/utils.h" namespace libcamera { @@ -234,13 +233,13 @@ void IPARkISP1::updateStatistics(unsigned int frame, double exposure; exposure = factor * exposure_ * gain_ / minGain_; - exposure_ = utils::clamp<uint64_t>((uint64_t)exposure, - minExposure_, - maxExposure_); + exposure_ = std::clamp<uint64_t>((uint64_t)exposure, + minExposure_, + maxExposure_); exposure = exposure / exposure_ * minGain_; - gain_ = utils::clamp<uint64_t>((uint64_t)exposure, - minGain_, maxGain_); + gain_ = std::clamp<uint64_t>((uint64_t)exposure, + minGain_, maxGain_); setControls(frame + 1); } -- cgit v1.2.1