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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Nov 25 15:48:59 UTC 2018


 svl/source/items/macitem.cxx |   19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

New commits:
commit 75299cd119dcb3121540471354d2b33af7f6684d
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sun Nov 25 16:47:01 2018 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sun Nov 25 16:47:01 2018 +0100

    Blind fix for pre-C++14 std::equal, for now
    
    ...which plagues some builders that haven't been updated to full C++17 support
    yet, let <https://ci.libreoffice.org/job/lo_tb_master_linux/31969/>
    
    Change-Id: I93ea997b9f7a85b370681103f64c791b2f28e4f2

diff --git a/svl/source/items/macitem.cxx b/svl/source/items/macitem.cxx
index 5cd29a0269d2..99375ea926a0 100644
--- a/svl/source/items/macitem.cxx
+++ b/svl/source/items/macitem.cxx
@@ -80,15 +80,16 @@ bool SvxMacroTableDtor::operator==( const SvxMacroTableDtor& rOther ) const
 {
     // Count different => odd in any case
     // Compare single ones; the sequence matters due to performance reasons
-    return std::equal(aSvxMacroTable.begin(), aSvxMacroTable.end(),
-        rOther.aSvxMacroTable.begin(), rOther.aSvxMacroTable.end(),
-        [](const SvxMacroTable::value_type& rOwnEntry, const SvxMacroTable::value_type& rOtherEntry) {
-            const SvxMacro& rOwnMac = rOwnEntry.second;
-            const SvxMacro& rOtherMac = rOtherEntry.second;
-            return rOwnEntry.first == rOtherEntry.first
-                && rOwnMac.GetLibName() == rOtherMac.GetLibName()
-                && rOwnMac.GetMacName() == rOtherMac.GetMacName();
-        });
+    return aSvxMacroTable.size() == rOther.aSvxMacroTable.size()
+        && std::equal(aSvxMacroTable.begin(), aSvxMacroTable.end(),
+            rOther.aSvxMacroTable.begin(),
+            [](const SvxMacroTable::value_type& rOwnEntry, const SvxMacroTable::value_type& rOtherEntry) {
+                const SvxMacro& rOwnMac = rOwnEntry.second;
+                const SvxMacro& rOtherMac = rOtherEntry.second;
+                return rOwnEntry.first == rOtherEntry.first
+                    && rOwnMac.GetLibName() == rOtherMac.GetLibName()
+                    && rOwnMac.GetMacName() == rOtherMac.GetMacName();
+            });
 }
 
 void SvxMacroTableDtor::Read( SvStream& rStrm )


More information about the Libreoffice-commits mailing list