Simpler IdMap::operator==

This commit is contained in:
Maxime Coste 2015-09-16 19:25:12 +01:00
parent 73c0fa175e
commit afad50514b

View File

@ -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>