summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-09-16 19:25:12 +0100
committerMaxime Coste <frrrwww@gmail.com>2015-09-16 19:25:12 +0100
commitafad50514b6653c1bfa767306d857f939de2eb02 (patch)
tree8b529fed027731a0eddc00ea28d5e75903042f3a
parent73c0fa175ed7016ffe2980b29d090de770718efa (diff)
Simpler IdMap::operator==
-rw-r--r--src/id_map.hh9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/id_map.hh b/src/id_map.hh
index 9b6f553b..e4c331de 100644
--- a/src/id_map.hh
+++ b/src/id_map.hh
@@ -72,14 +72,7 @@ public:
template<MemoryDomain dom>
bool operator==(const IdMap<Value, dom>& other) const
{
- if (size() != other.size())
- return false;
- for (size_t i = 0, s = size(); i < s; ++i)
- {
- if (m_content[i] != other.m_content[i])
- return false;
- }
- return true;
+ return size() == other.size() and std::equal(begin(), end(), other.begin());
}
template<MemoryDomain dom>