diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-01 14:55:56 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-02-04 06:41:35 +0000 |
commit | 4e9b528dccdfc438394b1ffe029f1fc8178a6086 (patch) | |
tree | 7c8afdd29d6ee6b63d6e7c2b0a9026739b5351f0 /libreofficekit/source | |
parent | 4fa4b9addfaa4291096cb6de5d98c6612c36757c (diff) |
new loplugin fpcomparison
Find code that compares floating point values with == or !=
It should rather use rtl::math::approxEqual
Change-Id: I9026e08823340fa1d6a042c430515344c93215bd
Reviewed-on: https://gerrit.libreoffice.org/21997
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'libreofficekit/source')
-rw-r--r-- | libreofficekit/source/gtk/lokdocview.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx index 737157bf515c..afaf71bcad2e 100644 --- a/libreofficekit/source/gtk/lokdocview.cxx +++ b/libreofficekit/source/gtk/lokdocview.cxx @@ -2666,7 +2666,7 @@ lok_doc_view_set_zoom (LOKDocView* pDocView, float fZoom) fZoom = fZoom < MIN_ZOOM ? MIN_ZOOM : fZoom; fZoom = fZoom > MAX_ZOOM ? MAX_ZOOM : fZoom; - if (fZoom == priv->m_fZoom) + if (rtl::math::approxEqual(fZoom, priv->m_fZoom)) return; priv->m_fZoom = fZoom; |