Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2133)

Unified Diff: Source/wtf/text/TextEncodingRegistry.cpp

Issue 256743005: Add removeAll method to sets and maps and use them (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moved implementation of removeAll to HashTable.h and shared it. Also added it to LinkedHashSet Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/wtf/ListHashSet.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/text/TextEncodingRegistry.cpp
diff --git a/Source/wtf/text/TextEncodingRegistry.cpp b/Source/wtf/text/TextEncodingRegistry.cpp
index 4dd0240043c598532f930409e545dd1a3848e671..7f241343fc7c841ff2f7e3611a93822967d23941 100644
--- a/Source/wtf/text/TextEncodingRegistry.cpp
+++ b/Source/wtf/text/TextEncodingRegistry.cpp
@@ -192,9 +192,7 @@ static void pruneBlacklistedCodecs()
names.append(it->key);
}
- size_t length = names.size();
- for (size_t j = 0; j < length; ++j)
- textEncodingNameMap->remove(names[j]);
+ textEncodingNameMap->removeAll(names);
textCodecMap->remove(atomicName);
}
« no previous file with comments | « Source/wtf/ListHashSet.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698