Related: fdo#49208 implement operator== with faster equals
we have an optimized equals which checks that the strings being compared for equality share the same underlying pImpl, but out operator== implementations don't use it! Change-Id: Ie5c464494ff875315a5ca369a2da80c22c29f431
This commit is contained in:
parent
6f0503c82c
commit
2b168fecce
2 changed files with 2 additions and 2 deletions
|
@ -712,7 +712,7 @@ public:
|
|||
}
|
||||
|
||||
friend sal_Bool operator == ( const OString& rStr1, const OString& rStr2 ) SAL_THROW(())
|
||||
{ return rStr1.getLength() == rStr2.getLength() && rStr1.compareTo( rStr2 ) == 0; }
|
||||
{ return rStr1.equals(rStr2); }
|
||||
friend sal_Bool operator != ( const OString& rStr1, const OString& rStr2 ) SAL_THROW(())
|
||||
{ return !(operator == ( rStr1, rStr2 )); }
|
||||
friend sal_Bool operator < ( const OString& rStr1, const OString& rStr2 ) SAL_THROW(())
|
||||
|
|
|
@ -988,7 +988,7 @@ public:
|
|||
}
|
||||
|
||||
friend sal_Bool operator == ( const OUString& rStr1, const OUString& rStr2 ) SAL_THROW(())
|
||||
{ return rStr1.getLength() == rStr2.getLength() && rStr1.compareTo( rStr2 ) == 0; }
|
||||
{ return rStr1.equals(rStr2); }
|
||||
friend sal_Bool operator == ( const OUString& rStr1, const sal_Unicode * pStr2 ) SAL_THROW(())
|
||||
{ return rStr1.compareTo( pStr2 ) == 0; }
|
||||
friend sal_Bool operator == ( const sal_Unicode * pStr1, const OUString& rStr2 ) SAL_THROW(())
|
||||
|
|
Loading…
Reference in a new issue