[Libreoffice-commits] core.git: Branch 'private/kohei/calc-shared-string' - sc/source

Kohei Yoshida kohei.yoshida at collabora.com
Sat Oct 19 11:55:51 PDT 2013


 sc/source/core/tool/compare.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 89dd988993c797119913ea05608d73a63231f428
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Sat Oct 19 14:56:12 2013 -0400

    approxEqual with 0.0 always is false. Do a normal non-equality check.
    
    Plus approxEqual is slightly slower.
    
    Change-Id: I16e7db6b06b3c0eceb8b8a1b7afd29660ff1da6a

diff --git a/sc/source/core/tool/compare.cxx b/sc/source/core/tool/compare.cxx
index 5f7dd12..bf50093 100644
--- a/sc/source/core/tool/compare.cxx
+++ b/sc/source/core/tool/compare.cxx
@@ -55,7 +55,7 @@ double CompareFunc( const Compare& rComp, CompareOptions* pOptions )
             ;       // empty cell == empty cell, fRes 0
         else if( rComp.bVal[ 1 ] )
         {
-            if ( !::rtl::math::approxEqual( rComp.nVal[ 1 ], 0.0 ) )
+            if (rComp.nVal[1] != 0.0)
             {
                 if ( rComp.nVal[ 1 ] < 0.0 )
                     fRes = 1;       // empty cell > -x
@@ -75,7 +75,7 @@ double CompareFunc( const Compare& rComp, CompareOptions* pOptions )
     {
         if( rComp.bVal[ 0 ] )
         {
-            if ( !::rtl::math::approxEqual( rComp.nVal[ 0 ], 0.0 ) )
+            if (rComp.nVal[0] != 0.0)
             {
                 if ( rComp.nVal[ 0 ] < 0.0 )
                     fRes = -1;      // -x < empty cell


More information about the Libreoffice-commits mailing list