mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Merge pull request #569 from TsudaKageyu/map-erase
std::map::erase() can take a key directly and has no-throw guarantee.
This commit is contained in:
commit
0ea22348cb
@ -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…
Reference in New Issue
Block a user