From df8cafaf8788eb27c25576ce94ca605f8a50527d Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Mon, 12 Jul 2021 11:02:03 +0100 Subject: ipa: raspberrypi: Add a constructor struct DeviceStatus The constructor sets all fields to 0. This replaces the memset(0) and default value initialisation usage in the agc and lux controllers respectively. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/ipa/raspberrypi/controller/rpi/geq.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ipa/raspberrypi/controller/rpi/geq.cpp') diff --git a/src/ipa/raspberrypi/controller/rpi/geq.cpp b/src/ipa/raspberrypi/controller/rpi/geq.cpp index bdceb1f3..4530cb75 100644 --- a/src/ipa/raspberrypi/controller/rpi/geq.cpp +++ b/src/ipa/raspberrypi/controller/rpi/geq.cpp @@ -49,7 +49,7 @@ void Geq::Prepare(Metadata *image_metadata) lux_status.lux = 400; if (image_metadata->Get("lux.status", lux_status)) LOG(RPiGeq, Warning) << "no lux data found"; - DeviceStatus device_status = {}; + DeviceStatus device_status; device_status.analogue_gain = 1.0; // in case not found if (image_metadata->Get("device.status", device_status)) LOG(RPiGeq, Warning) -- cgit v1.2.1