idvaluemap: add a remove_all method

This commit is contained in:
Maxime Coste 2013-04-11 14:27:32 +02:00
parent 4cf7c4175a
commit 172f46f679

View File

@ -54,14 +54,15 @@ public:
void remove(const Id& id)
{
for (auto it = m_content.begin(); it != m_content.end(); ++it)
{
if (it->first == id)
{
m_content.erase(it);
return;
}
}
auto it = find(id);
if (it != end())
m_content.erase(it);
}
void remove_all(const Id& id)
{
for (auto it = find(id); it != end(); it = find(id))
m_content.erase(it);
}
template<typename Condition>