sc/source/core/data/queryevaluator.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit d71cd10b5cefa9d0ce3c51340255ccd0399ef538
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri Oct 25 08:57:46 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Oct 25 11:47:36 2024 +0200

    don't always need this object
    
    Change-Id: I1b9efe872bb31a2cd53adc30d63590b5bc9693ae
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175623
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sc/source/core/data/queryevaluator.cxx 
b/sc/source/core/data/queryevaluator.cxx
index 4d3a02575066..17f500ffc629 100644
--- a/sc/source/core/data/queryevaluator.cxx
+++ b/sc/source/core/data/queryevaluator.cxx
@@ -734,14 +734,13 @@ std::pair<bool, bool> 
ScQueryEvaluator::processEntry(SCROW nRow, SCCOL nCol, ScR
             }
         }
     }
-    svl::SharedString cellSharedString;
     const bool bFastCompareByString = isFastCompareByString(rEntry);
     if (rEntry.eOp == SC_EQUAL && rItems.size() >= 10 && bFastCompareByString)
     {
         // The same as above but for strings. Try to optimize the case when
         // it's a svl::SharedString comparison. That happens when SC_EQUAL is 
used
         // and simple matching is used, see compareByString()
-        cellSharedString = getCellSharedString(aCell, nRow, rEntry.nField);
+        svl::SharedString cellSharedString = getCellSharedString(aCell, nRow, 
rEntry.nField);
         // Allow also checking ScQueryEntry::ByValue if the cell is not 
numeric,
         // as in that case isQueryByNumeric() would be false and 
isQueryByString() would
         // be true because of SC_EQUAL making isTextMatchOp() true.
@@ -815,7 +814,7 @@ std::pair<bool, bool> ScQueryEvaluator::processEntry(SCROW 
nRow, SCCOL nCol, ScR
         }
         else if (isQueryByString(rEntry.eOp, rItem.meType, aCell))
         {
-            cellSharedString = getCellSharedString(aCell, nRow, rEntry.nField);
+            svl::SharedString cellSharedString = getCellSharedString(aCell, 
nRow, rEntry.nField);
             std::pair<bool, bool> aThisRes;
             if (bFastCompareByString) // fast
                 aThisRes = compareByString<true>(rEntry, rItem, 
&cellSharedString, nullptr);

Reply via email to