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

Unified Diff: third_party/WebKit/Source/wtf/HashMap.h

Issue 2673543003: Migrate WTF::HashMap::remove() to ::erase() (Closed)
Patch Set: Created 3 years, 11 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
Index: third_party/WebKit/Source/wtf/HashMap.h
diff --git a/third_party/WebKit/Source/wtf/HashMap.h b/third_party/WebKit/Source/wtf/HashMap.h
index a70d000088643ffcb787d4863458173c39111fdc..08095da08a43ba9b830111467fe868bc1888de74 100644
--- a/third_party/WebKit/Source/wtf/HashMap.h
+++ b/third_party/WebKit/Source/wtf/HashMap.h
@@ -150,7 +150,11 @@ class HashMap {
template <typename IncomingKeyType, typename IncomingMappedType>
AddResult add(IncomingKeyType&&, IncomingMappedType&&);
+ // TODO(pilgrim) remove remove() method once all references migrated to
+ // erase()
+ // https://crbug.com/662431
void remove(KeyPeekInType);
+ void erase(KeyPeekInType);
void remove(iterator);
void clear();
template <typename Collection>
@@ -623,6 +627,16 @@ template <typename T,
typename W,
typename X,
typename Y>
+inline void HashMap<T, U, V, W, X, Y>::erase(KeyPeekInType key) {
+ remove(find(key));
+}
+
+template <typename T,
+ typename U,
+ typename V,
+ typename W,
+ typename X,
+ typename Y>
inline void HashMap<T, U, V, W, X, Y>::clear() {
m_impl.clear();
}
« no previous file with comments | « third_party/WebKit/Source/web/tests/sim/SimNetwork.cpp ('k') | third_party/WebKit/Source/wtf/HashMapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698