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

Unified Diff: Source/wtf/LinkedHashSet.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/HashTable.h ('k') | Source/wtf/ListHashSet.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/LinkedHashSet.h
diff --git a/Source/wtf/LinkedHashSet.h b/Source/wtf/LinkedHashSet.h
index f80301c65cc83841a9f01674a04427446d0e6a83..36e797b5f5cd68ee9bda1d428e7df095bb6ffbfe 100644
--- a/Source/wtf/LinkedHashSet.h
+++ b/Source/wtf/LinkedHashSet.h
@@ -240,6 +240,8 @@ public:
void remove(ValuePeekInType);
void remove(iterator);
void clear() { m_impl.clear(); }
+ template<typename Collection>
+ void removeAll(const Collection& other) { WTF::removeAll(*this, other); }
void trace(typename Allocator::Visitor* visitor) { m_impl.trace(visitor); }
« no previous file with comments | « Source/wtf/HashTable.h ('k') | Source/wtf/ListHashSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698