diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-10-10 13:10:21 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-10-10 13:10:48 +0200 |
commit | 1dac51334ba1440b158078f0dae765c7df55efb4 (patch) | |
tree | 3330259593797460d489610a9d3c5d957c50ec10 /sal/rtl | |
parent | 0db235d61f323cecbbc1db761ba19cb5da4b3e6f (diff) |
Handle loplugin:fpcomparison false positives by whitelist
Change-Id: I58e2beb0695a27922856bd8f8988d9e4508aceb6
Diffstat (limited to 'sal/rtl')
-rw-r--r-- | sal/rtl/math.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sal/rtl/math.cxx b/sal/rtl/math.cxx index 789c1354dfa7..9ce10f7c0ff6 100644 --- a/sal/rtl/math.cxx +++ b/sal/rtl/math.cxx @@ -1090,9 +1090,7 @@ bool SAL_CALL rtl_math_approxEqual(double a, double b) SAL_THROW_EXTERN_C() { static const double e48 = 1.0 / (16777216.0 * 16777216.0); static const double e44 = e48 * 16.0; - // XXX loplugin:fpcomparison complains about floating-point comparison for - // a==b, though we actually want this here. - if (!(a<b) && !(a>b)) + if (a == b) return true; if (a == 0.0 || b == 0.0) return false; |