diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 868a56540..7c2d71aaa 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -218,21 +218,22 @@ public: return *this; } - bool operator ==(const Threshold &rhs) const + template + typename std::enable_if::value, bool>::type operator ==(const Threshold &rhs) const { 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; + return std::fabs(value[0] - rhs.value[0]) < 1e-10 + && std::fabs(value[1] - rhs.value[1]) < 1e-10 + && std::fabs(value[2] - rhs.value[2]) < 1e-10 + && std::fabs(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; + return std::fabs(value[0] - rhs.value[0]) < 1e-10 + && std::fabs(value[1] - rhs.value[1]) < 1e-10; } } - template::value>::type> - bool operator ==(const Threshold &rhs) const + template + typename std::enable_if::value, bool>::type operator ==(const Threshold &rhs) const { if (_isDouble) { return