diff --git a/taglib/ape/apetag.cpp b/taglib/ape/apetag.cpp index 22471d40..e0c2a24e 100644 --- a/taglib/ape/apetag.cpp +++ b/taglib/ape/apetag.cpp @@ -284,9 +284,7 @@ const APE::ItemListMap& APE::Tag::itemListMap() const void APE::Tag::removeItem(const String &key) { - Map::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) diff --git a/taglib/asf/asftag.cpp b/taglib/asf/asftag.cpp index 1389c122..bdf3c5da 100644 --- a/taglib/asf/asftag.cpp +++ b/taglib/asf/asftag.cpp @@ -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