[Libreoffice-commits] core.git: svl/source

Kohei Yoshida kohei.yoshida at collabora.com
Fri Oct 11 12:47:13 PDT 2013


 svl/source/misc/sharedstring.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 78e0d07b6250ba441bae2c7517ed973d99bbd0b3
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Fri Oct 11 15:47:49 2013 -0400

    Compare by pointers first.
    
    Change-Id: Iec697f7100c06da37158e564ac64f0248f923638

diff --git a/svl/source/misc/sharedstring.cxx b/svl/source/misc/sharedstring.cxx
index 6a5d395..ed4257d 100644
--- a/svl/source/misc/sharedstring.cxx
+++ b/svl/source/misc/sharedstring.cxx
@@ -73,6 +73,9 @@ SharedString& SharedString::operator= ( const SharedString& r )
 bool SharedString::operator== ( const SharedString& r ) const
 {
     // Only compare case sensitive strings.
+    if (mpData == r.mpData)
+        return true;
+
     if (mpData)
     {
         if (!r.mpData)


More information about the Libreoffice-commits mailing list