summaryrefslogtreecommitdiff
path: root/libreofficekit/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-10-10 13:10:21 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-10-10 13:10:48 +0200
commit1dac51334ba1440b158078f0dae765c7df55efb4 (patch)
tree3330259593797460d489610a9d3c5d957c50ec10 /libreofficekit/source
parent0db235d61f323cecbbc1db761ba19cb5da4b3e6f (diff)
Handle loplugin:fpcomparison false positives by whitelist
Change-Id: I58e2beb0695a27922856bd8f8988d9e4508aceb6
Diffstat (limited to 'libreofficekit/source')
-rw-r--r--libreofficekit/source/gtk/lokdocview.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 4d34428a3312..c4159b069c82 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -3188,9 +3188,7 @@ namespace {
inline bool lok_approxEqual(double a, double b)
{
static const double e48 = 1.0 / (16777216.0 * 16777216.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;