From: Tsuda Kageyu Date: Thu, 21 May 2015 16:26:56 +0000 (+0900) Subject: std::map::erase() can take a key directly and has no-throw guarantee. X-Git-Tag: v1.10beta~77^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=54de66f2751d2d870815ec60ef4e9696ca13e34d;p=taglib std::map::erase() can take a key directly and has no-throw guarantee. --- diff --git a/taglib/toolkit/tmap.tcc b/taglib/toolkit/tmap.tcc index 5d3abcad..8c1106df 100644 --- a/taglib/toolkit/tmap.tcc +++ b/taglib/toolkit/tmap.tcc @@ -145,9 +145,7 @@ template Map &Map::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; }