Simpler IdMap::operator==
This commit is contained in:
parent
73c0fa175e
commit
afad50514b
|
@ -72,14 +72,7 @@ public:
|
||||||
template<MemoryDomain dom>
|
template<MemoryDomain dom>
|
||||||
bool operator==(const IdMap<Value, dom>& other) const
|
bool operator==(const IdMap<Value, dom>& other) const
|
||||||
{
|
{
|
||||||
if (size() != other.size())
|
return size() == other.size() and std::equal(begin(), end(), other.begin());
|
||||||
return false;
|
|
||||||
for (size_t i = 0, s = size(); i < s; ++i)
|
|
||||||
{
|
|
||||||
if (m_content[i] != other.m_content[i])
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<MemoryDomain dom>
|
template<MemoryDomain dom>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user