diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2024-09-26 01:06:20 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2024-09-30 10:56:48 +0300 |
commit | 8b378a56060fd4df8cd072d863832d49c34267b9 (patch) | |
tree | dd881c13156eecae1ac255b3bf33be7ce2496ec7 /src/android/mm | |
parent | e6da224926b0d18dc4ad814843f2561e4e16a027 (diff) |
ipa: rpi: Use std::abs()
As explained in the coding style document, usage of std::abs() is
preferred over abs() or fabs() as it picks the correct function based on
the argument type. Replace calls to abs() and fabs() with std::abs() in
the Raspberry Pi algorithms.
This fixes a reported warning from clang:
../src/ipa/rpi/controller/rpi/awb.cpp:508:6: error: using integer absolute value function 'abs' when argument is of floating point type [-Werror,-Wabsolute-value]
if (abs(denominator) > eps) {
^
../src/ipa/rpi/controller/rpi/awb.cpp:508:6: note: use function 'std::abs' instead
if (abs(denominator) > eps) {
^~~
std::abs
Reported-by: Maarten Lankhorst <dev@lankhorst.se>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/android/mm')
0 files changed, 0 insertions, 0 deletions