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

Miklos Vajna vmiklos at collabora.co.uk
Wed Jan 14 00:33:37 PST 2015


 sw/source/core/doc/doccomp.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 7e4f994adf7739478a242b6161f4d1b8b8a497d6
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Jan 14 09:30:39 2015 +0100

    SwDoc::CompareDoc: no need to copy 'a'
    
    Change-Id: Ia5cd68b7a6bf59d29af8188bd4477c00194fb850

diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index 3b828e5..91ab8d0 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -1845,7 +1845,7 @@ long SwDoc::CompareDoc( const SwDoc& rDoc )
 
     Comparators aComparisons(buildComparators(rSrcDoc, *this));
 
-    for (auto a : aComparisons)
+    for (auto& a : aComparisons)
     {
         CompareData& rD0 = *a.first.get();
         CompareData& rD1 = *a.second.get();
@@ -1858,7 +1858,7 @@ long SwDoc::CompareDoc( const SwDoc& rDoc )
         getIDocumentRedlineAccess().SetRedlineMode((RedlineMode_t)(nsRedlineMode_t::REDLINE_ON |
                        nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE));
 
-        for (auto a : aComparisons)
+        for (auto& a : aComparisons)
         {
             CompareData& rD1 = *a.second.get();
             rD1.SetRedlinesToDoc( !bDocWasModified );


More information about the Libreoffice-commits mailing list