summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-11-25 16:47:01 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-11-25 16:47:01 +0100
commit75299cd119dcb3121540471354d2b33af7f6684d (patch)
tree52b9442c779436996ea13f37eefb26ec60d196db
parentGenerally set CCACHE_CPP2 for --enable-werror GCC (diff)
downloadcore-75299cd119dcb3121540471354d2b33af7f6684d.tar.gz
core-75299cd119dcb3121540471354d2b33af7f6684d.zip
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
-rw-r--r--svl/source/items/macitem.cxx19
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 )