From 4ee191487e0d6357cee593be57bddf5ce814c715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Wed, 9 Nov 2016 19:28:14 +0100 Subject: [PATCH] Fix uncritical warnings in `rtengine/procparams.h` --- rtengine/procparams.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/rtengine/procparams.h b/rtengine/procparams.h index c65e89e24..3a7c3efbb 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -206,7 +206,7 @@ public: } }*/ - Threshold & operator= (const Threshold &rhs) + Threshold& operator =(const Threshold &rhs) { value[0] = rhs.value[0]; value[1] = rhs.value[1]; @@ -217,16 +217,17 @@ public: return *this; } - bool operator== (const Threshold &rhs) const + bool operator ==(const Threshold &rhs) const { - if (_isDouble) - return fabs(value[0] - rhs.value[0]) < 1e-10 - && fabs(value[1] - rhs.value[1]) < 1e-10 - && fabs(value[2] - rhs.value[2]) < 1e-10 - && fabs(value[3] - rhs.value[3]) < 1e-10; - else - return fabs(value[0] - rhs.value[0]) < 1e-10 - && fabs(value[1] - rhs.value[1]) < 1e-10; + if (_isDouble) { + return std::abs(value[0] - rhs.value[0]) < 1e-10 + && std::abs(value[1] - rhs.value[1]) < 1e-10 + && std::abs(value[2] - rhs.value[2]) < 1e-10 + && std::abs(value[3] - rhs.value[3]) < 1e-10; + } else { + return std::abs(value[0] - rhs.value[0]) < 1e-10 + && std::abs(value[1] - rhs.value[1]) < 1e-10; + } } };