summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller/rpi/alsc.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-08-22 18:53:54 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-08-25 02:58:05 +0300
commitde012767e7432ebadd7493d90e0a7139cc422306 (patch)
tree72f9851a474586eb5beaf4b8ffdc0a79d53be881 /src/ipa/raspberrypi/controller/rpi/alsc.cpp
parentdbafe16da7a9999ec77da21a42537702fb87f124 (diff)
ipa: raspberrypi: Replace void cast with [[maybe_unused]]
The standard way in C++17 to specify that a function or function argument may be unused it to specify the [[maybe_unused]] attribute. Replace manual void casts to silence compiler warnings. 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>
Diffstat (limited to 'src/ipa/raspberrypi/controller/rpi/alsc.cpp')
-rw-r--r--src/ipa/raspberrypi/controller/rpi/alsc.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/ipa/raspberrypi/controller/rpi/alsc.cpp b/src/ipa/raspberrypi/controller/rpi/alsc.cpp
index 9df713a3..0d0e0b0c 100644
--- a/src/ipa/raspberrypi/controller/rpi/alsc.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/alsc.cpp
@@ -200,10 +200,9 @@ static bool compare_modes(CameraMode const &cm0, CameraMode const &cm1)
top_diff > threshold_y || bottom_diff > threshold_y;
}
-void Alsc::SwitchMode(CameraMode const &camera_mode, Metadata *metadata)
+void Alsc::SwitchMode(CameraMode const &camera_mode,
+ [[maybe_unused]] Metadata *metadata)
{
- (void)metadata;
-
// We're going to start over with the tables if there's any "significant"
// change.
bool reset_tables = first_time_ || compare_modes(camera_mode_, camera_mode);
@@ -490,7 +489,7 @@ void compensate_lambdas_for_cal(double const cal_table[XY],
new_lambdas[i] /= min_new_lambda;
}
-static void print_cal_table(double const C[XY])
+[[maybe_unused]] static void print_cal_table(double const C[XY])
{
printf("table: [\n");
for (int j = 0; j < Y; j++) {
@@ -710,7 +709,6 @@ void Alsc::doAlsc()
resample_cal_table(cal_table_tmp, camera_mode_, cal_table_b);
// You could print out the cal tables for this image here, if you're
// tuning the algorithm...
- (void)print_cal_table;
// Apply any calibration to the statistics, so the adaptive algorithm
// makes only the extra adjustments.
apply_cal_table(cal_table_r, Cr);