From ba7cf5d6544d84237402511bd48720caa3028ece Mon Sep 17 00:00:00 2001 From: Hirokazu Honda Date: Tue, 5 Oct 2021 16:31:09 +0900 Subject: ipa: raspberrypi: agc: Remove using namespace in agc.hpp "using namespace" in a header file propagates the namespace to the files including the header file. So it should be avoided. This removes "using namespace" in agc.hpp. Signed-off-by: Hirokazu Honda Reviewed-by: David Plowman Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/ipa/raspberrypi/controller/rpi/agc.cpp | 7 +++++++ src/ipa/raspberrypi/controller/rpi/agc.hpp | 6 ++---- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src/ipa/raspberrypi') diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp index 289c1fce..f6a9cb0a 100644 --- a/src/ipa/raspberrypi/controller/rpi/agc.cpp +++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp @@ -22,6 +22,7 @@ using namespace RPiController; using namespace libcamera; using libcamera::utils::Duration; +using namespace std::literals::chrono_literals; LOG_DEFINE_CATEGORY(RPiAgc) @@ -159,6 +160,12 @@ void AgcConfig::Read(boost::property_tree::ptree const ¶ms) default_analogue_gain = params.get("default_analogue_gain", 1.0); } +Agc::ExposureValues::ExposureValues() + : shutter(0s), analogue_gain(0), + total_exposure(0s), total_exposure_no_dg(0s) +{ +} + Agc::Agc(Controller *controller) : AgcAlgorithm(controller), metering_mode_(nullptr), exposure_mode_(nullptr), constraint_mode_(nullptr), diff --git a/src/ipa/raspberrypi/controller/rpi/agc.hpp b/src/ipa/raspberrypi/controller/rpi/agc.hpp index 82063636..c100d312 100644 --- a/src/ipa/raspberrypi/controller/rpi/agc.hpp +++ b/src/ipa/raspberrypi/controller/rpi/agc.hpp @@ -24,8 +24,6 @@ namespace RPiController { -using namespace std::literals::chrono_literals; - struct AgcMeteringMode { double weights[AGC_STATS_SIZE]; void Read(boost::property_tree::ptree const ¶ms); @@ -112,8 +110,8 @@ private: uint64_t frame_count_; AwbStatus awb_; struct ExposureValues { - ExposureValues() : shutter(0s), analogue_gain(0), - total_exposure(0s), total_exposure_no_dg(0s) {} + ExposureValues(); + libcamera::utils::Duration shutter; double analogue_gain; libcamera::utils::Duration total_exposure; -- cgit v1.2.1