mirror of
https://github.com/taglib/taglib.git
synced 2025-06-04 01:28:21 -04:00
std::map::erase() can take a key directly and has no-throw guarantee.
This commit is contained in:
parent
d4b0ba2a7a
commit
54de66f275
@ -145,9 +145,7 @@ template <class Key, class T>
|
||||
Map<Key, T> &Map<Key,T>::erase(const Key &key)
|
||||
{
|
||||
detach();
|
||||
Iterator it = d->map.find(key);
|
||||
if(it != d->map.end())
|
||||
d->map.erase(it);
|
||||
d->map.erase(key);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user