[PATCH] fdo#62096 replaced some compareTo's with ==

Sameer Deshmukh (via Code Review) gerrit at gerrit.libreoffice.org
Sun Apr 21 11:13:00 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3543

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/43/3543/1

fdo#62096 replaced some compareTo's with ==

Change-Id: I2a8e835cdd7d00a31ec4acab433527ce8b6134ca
---
M sal/inc/rtl/ustring.hxx
M xmlhelp/source/cxxhelp/provider/db.hxx
2 files changed, 2 insertions(+), 2 deletions(-)



diff --git a/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx
index 13756f8..e405ddf 100644
--- a/sal/inc/rtl/ustring.hxx
+++ b/sal/inc/rtl/ustring.hxx
@@ -1113,7 +1113,7 @@
     friend sal_Bool     operator == ( const OUString& rStr1,    const OUString& rStr2 ) SAL_THROW(())
                         { return rStr1.equals(rStr2); }
     friend sal_Bool     operator == ( const OUString& rStr1,    const sal_Unicode * pStr2 ) SAL_THROW(())
-                        { return rStr1.compareTo( pStr2 ) == 0; }
+                        { return (rStr1 == pStr2); }
     friend sal_Bool     operator == ( const sal_Unicode * pStr1,    const OUString& rStr2 ) SAL_THROW(())
                         { return OUString( pStr1 ).compareTo( rStr2 ) == 0; }
 
diff --git a/xmlhelp/source/cxxhelp/provider/db.hxx b/xmlhelp/source/cxxhelp/provider/db.hxx
index d00fbab..2d60319 100644
--- a/xmlhelp/source/cxxhelp/provider/db.hxx
+++ b/xmlhelp/source/cxxhelp/provider/db.hxx
@@ -68,7 +68,7 @@
     struct eq
     {
         bool operator()( const OString& rKey1, const OString& rKey2 ) const
-            { return rKey1.compareTo( rKey2 ) == 0; }
+        { return (rKey == rKey2); }
     };
 
     struct ha

-- 
To view, visit https://gerrit.libreoffice.org/3543
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a8e835cdd7d00a31ec4acab433527ce8b6134ca
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Sameer Deshmukh <sameer.deshmukh93 at gmail.com>



More information about the LibreOffice mailing list