sc/source/core/tool/token.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a9577dd52d4bcf273bae4abbc8f168eab777172d
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Mon Aug 12 16:02:27 2024 +0500
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Mon Aug 12 17:52:06 2024 +0200

    Another case of pointers comparison
    
    Similar to https://gerrit.libreoffice.org/c/core/+/171756, this was
    this way since commit 7333881bb7b04f7e4e2a28638024ae82a9c14e81 (Formula
    tokens, formula cells and formula interpreters to use shared strings,
    2013-10-11). I don't know if this causes actual problems, but looks
    suspicious, and string comparison compares pointers for optimization.
    
    Change-Id: I544846b8b839606bdf2f118b87e5ea0c5961852f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171757
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index d78b04df8bd8..8d830cfef0b6 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -865,7 +865,7 @@ bool ScExternalNameToken::operator==( const FormulaToken& r 
) const
     if (mnFileId != r.GetIndex())
         return false;
 
-    return maName.getData() == r.GetString().getData();
+    return maName == r.GetString();
 }
 
 ScTableRefToken::ScTableRefToken( sal_uInt16 nIndex, ScTableRefToken::Item 
eItem ) :

Reply via email to