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

Unified Diff: Source/wtf/HashMap.h

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/web/AssociatedURLLoader.cpp ('k') | Source/wtf/HashSet.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/HashMap.h
diff --git a/Source/wtf/HashMap.h b/Source/wtf/HashMap.h
index dd15c3d4f308ad1440dd113f8f66fcfa3ed81a32..5c2d366f4098cc3405e6dadc7c884af04965a7b0 100644
--- a/Source/wtf/HashMap.h
+++ b/Source/wtf/HashMap.h
@@ -126,6 +126,8 @@ namespace WTF {
void remove(KeyPeekInType);
void remove(iterator);
void clear();
+ template<typename Collection>
+ void removeAll(const Collection& toBeRemoved) { WTF::removeAll(*this, toBeRemoved); }
MappedPassOutType take(KeyPeekInType); // efficient combination of get with remove
« no previous file with comments | « Source/web/AssociatedURLLoader.cpp ('k') | Source/wtf/HashSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698