sw/source/core/model/SearchResultLocator.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 943ee532597d24c50e650b8910241c0b7a3a6fef
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri Jul 12 08:47:29 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Jul 12 17:39:16 2024 +0200

    cid#1555177 Use of auto that causes a copy
    
    Change-Id: I35cd8baa84fdbca49c17143968a71dcc9a0d760f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170409
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/core/model/SearchResultLocator.cxx 
b/sw/source/core/model/SearchResultLocator.cxx
index fafc284e910c..76a5b8e0d409 100644
--- a/sw/source/core/model/SearchResultLocator.cxx
+++ b/sw/source/core/model/SearchResultLocator.cxx
@@ -62,11 +62,11 @@ void SearchResultLocator::findOne(LocationResult& rResult, 
SearchIndexData const
             {
                 if (pObject->GetName() == rSearchIndexData.maObjectName)
                 {
-                    auto aRect = pObject->GetLogicRect();
+                    const tools::Rectangle& rRect = pObject->GetLogicRect();
                     rResult.mbFound = true;
-                    rResult.maRectangles.emplace_back(aRect.Left(), 
aRect.Top(),
-                                                      aRect.Left() + 
aRect.GetWidth(),
-                                                      aRect.Top() + 
aRect.GetHeight());
+                    rResult.maRectangles.emplace_back(rRect.Left(), 
rRect.Top(),
+                                                      rRect.Left() + 
rRect.GetWidth(),
+                                                      rRect.Top() + 
rRect.GetHeight());
                 }
             }
         }

Reply via email to