diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-04-22 09:53:49 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-04-22 09:53:49 +0200 |
commit | ff4464659ec54732c45729ace964d60e77d19eb2 (patch) | |
tree | 8c63d1214e66dff745cc9477e8cd93bf5d06ddea /sal | |
parent | Replace chained O(U)StringBuffer::append() with operator+ (diff) | |
download | core-ff4464659ec54732c45729ace964d60e77d19eb2.tar.gz core-ff4464659ec54732c45729ace964d60e77d19eb2.zip |
Revert "fdo#62096: Replaced some compareTo with =="
This reverts commit dd47994722eaead16099145e593fbf878072d52b.
Diffstat (limited to 'sal')
-rw-r--r-- | sal/inc/rtl/string.hxx | 8 | ||||
-rw-r--r-- | sal/qa/rtl_strings/rtl_OString.cxx | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx index 815126284aaa..e3d5afbc895a 100644 --- a/sal/inc/rtl/string.hxx +++ b/sal/inc/rtl/string.hxx @@ -782,25 +782,25 @@ public: template< typename T > friend typename internal::CharPtrDetector< T, bool >::Type operator==( const OString& rStr1, const T& value ) SAL_THROW(()) { - return (rStr1 == value); + return rStr1.compareTo( value ) == 0; } template< typename T > friend typename internal::NonConstCharArrayDetector< T, bool >::Type operator==( const OString& rStr1, T& value ) SAL_THROW(()) { - return (rStr1 == value); + return rStr1.compareTo( value ) == 0; } template< typename T > friend typename internal::CharPtrDetector< T, bool >::Type operator==( const T& value, const OString& rStr2 ) SAL_THROW(()) { - return (rStr2 == value); + return rStr2.compareTo( value ) == 0; } template< typename T > friend typename internal::NonConstCharArrayDetector< T, bool >::Type operator==( T& value, const OString& rStr2 ) SAL_THROW(()) { - return (rStr2 == value); + return rStr2.compareTo( value ) == 0; } /** diff --git a/sal/qa/rtl_strings/rtl_OString.cxx b/sal/qa/rtl_strings/rtl_OString.cxx index 293381cd2a7c..1934f0625248 100644 --- a/sal/qa/rtl_strings/rtl_OString.cxx +++ b/sal/qa/rtl_strings/rtl_OString.cxx @@ -1929,7 +1929,7 @@ sal_Bool test_valueOf( const char** resArray, int n, sal_Int16 radix, bRes &= c_rtl_tres_state ( hRtlTestResult, - aStr2 == aStr1, + aStr2.compareTo(aStr1) == 0, (sal_Char*)resArray[i], createName( pMeth, "valueOf", i ) ); @@ -2163,7 +2163,7 @@ sal_Bool SAL_CALL test_rtl_OString_valueOf_Int32_WrongRadix( bRes = c_rtl_tres_state ( hRtlTestResult, - aStr2 == aStr1, + aStr2.compareTo( aStr1 ) == 0, "if radix not valid then radix must be 10", "valueOf(sal_Int32, sal_Int32 radix): radix = -5" ); @@ -2411,7 +2411,7 @@ sal_Bool SAL_CALL test_rtl_OString_valueOf_Int64_WrongRadix( bRes = c_rtl_tres_state ( hRtlTestResult, - aStr2 == aStr1, + aStr2.compareTo(aStr1) == 0, "if radix not valid then radix must be 10", "valueOf(sal_Int64, sal_Int32 radix): radix = -5" ); |