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

Unified Diff: Source/wtf/ListHashSet.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/wtf/LinkedHashSet.h ('k') | Source/wtf/text/TextEncodingRegistry.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/ListHashSet.h
diff --git a/Source/wtf/ListHashSet.h b/Source/wtf/ListHashSet.h
index f1624dc359e89877301233181e522c994fe237fd..c41e73bb2e32ffe2ac713fd508708682f896278c 100644
--- a/Source/wtf/ListHashSet.h
+++ b/Source/wtf/ListHashSet.h
@@ -156,6 +156,8 @@ namespace WTF {
void remove(ValuePeekInType);
void remove(iterator);
void clear();
+ template<typename Collection>
+ void removeAll(const Collection& other) { WTF::removeAll(*this, other); }
private:
void unlink(Node*);
« no previous file with comments | « Source/wtf/LinkedHashSet.h ('k') | Source/wtf/text/TextEncodingRegistry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698