Map::erase() can take a key directly so no need to call find() beforehand.

This commit is contained in:
Tsuda Kageyu
2015-05-23 18:12:01 +09:00
parent 93da3ba6d9
commit 6d6f544010
2 changed files with 2 additions and 6 deletions

View File

@ -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