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

Unified Diff: third_party/WebKit/Source/core/events/EventListenerMap.cpp

Issue 2776203002: Migrate WTF::Vector::remove() to ::erase() (Closed)
Patch Set: rebase, repatch VectorTest 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
Index: third_party/WebKit/Source/core/events/EventListenerMap.cpp
diff --git a/third_party/WebKit/Source/core/events/EventListenerMap.cpp b/third_party/WebKit/Source/core/events/EventListenerMap.cpp
index a197f4e1e241f6c7199864d64752479c6c35701d..0512a238cfdc43f4bce66cc157bca827973d5a4f 100644
--- a/third_party/WebKit/Source/core/events/EventListenerMap.cpp
+++ b/third_party/WebKit/Source/core/events/EventListenerMap.cpp
@@ -149,7 +149,7 @@ static bool removeListenerFromVector(
}
*registeredListener = *it;
*indexOfRemovedListener = it - begin;
- listenerVector->remove(*indexOfRemovedListener);
+ listenerVector->erase(*indexOfRemovedListener);
return true;
}
@@ -166,7 +166,7 @@ bool EventListenerMap::remove(const AtomicString& eventType,
removeListenerFromVector(m_entries[i].second.get(), listener, options,
indexOfRemovedListener, registeredListener);
if (m_entries[i].second->isEmpty())
- m_entries.remove(i);
+ m_entries.erase(i);
return wasRemoved;
}
}

Powered by Google App Engine
This is Rietveld 408576698