loplugin:fpcomparison in basic/

Change-Id: I76ffac6a0f0b1525c85d1995277d3ca22ef268e1
Reviewed-on: https://gerrit.libreoffice.org/21869
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
Noel Grandin
2016-01-27 11:07:06 +02:00
committed by Noel Grandin
parent 5569a65ea4
commit 4fa4b9addf
2 changed files with 2 additions and 2 deletions

View File

@@ -1028,7 +1028,7 @@ Any sbxToUnoValueImpl( const SbxValue* pVar, bool bBlockConversionToSmallestType
case TypeClass_DOUBLE:
{
double d = pVar->GetDouble();
if( d == floor( d ) )
if( rtl::math::approxEqual(d, floor( d )) )
{
if( d >= -128 && d <= 127 )
aType = ::cppu::UnoType<sal_Int8>::get();

View File

@@ -281,7 +281,7 @@ start:
if( n <= -1.0 || n >= 1.0 )
{
// Time only if != 00:00:00
if( floor( n ) == n )
if( rtl::math::approxEqual(floor( n ), n) )
{
switch( eDate )
{