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

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

Issue 2759703002: Migrate WTF::HashMap::remove() to ::erase() (Closed)
Patch Set: rebase, fix one platform-specific reference Created 3 years, 9 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 | « third_party/WebKit/Source/wtf/HashCountedSet.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 423f2ff0a1852cd7c2100520854f79f9de923c97..d111458ba4f29acb642239345541de59e519c452 100644
--- a/third_party/WebKit/Source/wtf/HashMap.h
+++ b/third_party/WebKit/Source/wtf/HashMap.h
@@ -150,12 +150,8 @@ class HashMap {
template <typename IncomingKeyType, typename IncomingMappedType>
AddResult insert(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 erase(iterator);
void clear();
template <typename Collection>
void removeAll(const Collection& toBeRemoved) {
@@ -608,7 +604,7 @@ template <typename T,
typename W,
typename X,
typename Y>
-inline void HashMap<T, U, V, W, X, Y>::remove(iterator it) {
+inline void HashMap<T, U, V, W, X, Y>::erase(iterator it) {
m_impl.remove(it.m_impl);
}
@@ -618,18 +614,8 @@ template <typename T,
typename W,
typename X,
typename Y>
-inline void HashMap<T, U, V, W, X, Y>::remove(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>::erase(KeyPeekInType key) {
- remove(find(key));
+ erase(find(key));
}
template <typename T,
@@ -653,7 +639,7 @@ auto HashMap<T, U, V, W, X, Y>::take(KeyPeekInType key) -> MappedType {
if (it == end())
return MappedTraits::emptyValue();
MappedType result = std::move(it->value);
- remove(it);
+ erase(it);
return result;
}
« no previous file with comments | « third_party/WebKit/Source/wtf/HashCountedSet.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698