mirror of
https://github.com/taglib/taglib.git
synced 2025-06-04 01:28:21 -04:00
Map::erase() can take a key directly so no need to call find() beforehand.
This commit is contained in:
parent
93da3ba6d9
commit
6d6f544010
@ -284,9 +284,7 @@ const APE::ItemListMap& APE::Tag::itemListMap() const
|
||||
|
||||
void APE::Tag::removeItem(const String &key)
|
||||
{
|
||||
Map<const String, Item>::Iterator it = d->itemListMap.find(key.upper());
|
||||
if(it != d->itemListMap.end())
|
||||
d->itemListMap.erase(it);
|
||||
d->itemListMap.erase(key.upper());
|
||||
}
|
||||
|
||||
void APE::Tag::addValue(const String &key, const String &value, bool replace)
|
||||
|
@ -172,9 +172,7 @@ bool ASF::Tag::contains(const String &key) const
|
||||
|
||||
void ASF::Tag::removeItem(const String &key)
|
||||
{
|
||||
AttributeListMap::Iterator it = d->attributeListMap.find(key);
|
||||
if(it != d->attributeListMap.end())
|
||||
d->attributeListMap.erase(it);
|
||||
d->attributeListMap.erase(key);
|
||||
}
|
||||
|
||||
ASF::AttributeList ASF::Tag::attribute(const String &name) const
|
||||
|
Loading…
x
Reference in New Issue
Block a user