idvaluemap: add a remove_all method
This commit is contained in:
parent
4cf7c4175a
commit
172f46f679
|
@ -54,14 +54,15 @@ public:
|
||||||
|
|
||||||
void remove(const Id& id)
|
void remove(const Id& id)
|
||||||
{
|
{
|
||||||
for (auto it = m_content.begin(); it != m_content.end(); ++it)
|
auto it = find(id);
|
||||||
{
|
if (it != end())
|
||||||
if (it->first == id)
|
m_content.erase(it);
|
||||||
{
|
}
|
||||||
m_content.erase(it);
|
|
||||||
return;
|
void remove_all(const Id& id)
|
||||||
}
|
{
|
||||||
}
|
for (auto it = find(id); it != end(); it = find(id))
|
||||||
|
m_content.erase(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Condition>
|
template<typename Condition>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user