summaryrefslogtreecommitdiff
path: root/registry
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-01-27 11:06:24 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-02-04 06:25:19 +0000
commit0e414e1433acf775c17063cc748818ee7dd822e3 (patch)
tree7052cd3ce75e393b855160643e9bd3b41bd35cf2 /registry
parent318a23b4f4e3e02b664437044de833b9a8e4f85f (diff)
loplugin:fpcomparison in registry/
Change-Id: Ifdc2df9ba51ce8ef2c8793bb51c28a547f22214f Reviewed-on: https://gerrit.libreoffice.org/21866 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'registry')
-rw-r--r--registry/tools/regcompare.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/registry/tools/regcompare.cxx b/registry/tools/regcompare.cxx
index d5e33c7977e2..901f719e6d68 100644
--- a/registry/tools/regcompare.cxx
+++ b/registry/tools/regcompare.cxx
@@ -25,6 +25,7 @@
#include "options.hxx"
#include <rtl/ustring.hxx>
+#include <rtl/math.hxx>
#include <osl/diagnose.h>
#include <stdio.h>
@@ -584,7 +585,7 @@ static sal_uInt32 checkConstValue(Options_Impl const & options,
}
break;
case RT_TYPE_FLOAT:
- if (constValue1.m_value.aFloat != constValue2.m_value.aFloat)
+ if (!rtl::math::approxEqual(constValue1.m_value.aFloat, constValue2.m_value.aFloat))
{
if ( options.forceOutput() && !options.unoTypeCheck() )
{
@@ -596,7 +597,7 @@ static sal_uInt32 checkConstValue(Options_Impl const & options,
}
break;
case RT_TYPE_DOUBLE:
- if (constValue1.m_value.aDouble != constValue2.m_value.aDouble)
+ if (!rtl::math::approxEqual(constValue1.m_value.aDouble, constValue2.m_value.aDouble))
{
if ( options.forceOutput() && !options.unoTypeCheck() )
{