diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-11-25 16:47:01 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-11-25 16:47:01 +0100 |
commit | 75299cd119dcb3121540471354d2b33af7f6684d (patch) | |
tree | 52b9442c779436996ea13f37eefb26ec60d196db /svl | |
parent | f9ba4c2be1c1514553050fea37c48b757a68d4fd (diff) |
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
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/macitem.cxx | 19 |
1 files changed, 10 insertions, 9 deletions
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 ) |