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

Unified Diff: third_party/WebKit/Source/platform/wtf/Vector.h

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/platform/wtf/Vector.h
diff --git a/third_party/WebKit/Source/platform/wtf/Vector.h b/third_party/WebKit/Source/platform/wtf/Vector.h
index 88e343d5c78047504c57ea3870a6f3ccf06b633e..76280a3cd3c77ba13574f6584f3b5565b435cc03 100644
--- a/third_party/WebKit/Source/platform/wtf/Vector.h
+++ b/third_party/WebKit/Source/platform/wtf/Vector.h
@@ -1169,8 +1169,8 @@ class Vector
// take O(size())-time. All of the elements after the removed ones will be
// moved to the new locations. All the iterators pointing to any element
// after |position| will be invalidated.
- void remove(size_t position);
- void remove(size_t position, size_t length);
+ void erase(size_t position);
+ void erase(size_t position, size_t length);
// Remove the last element. Unlike remove(), (1) this function is fast, and
// (2) only iterators pointing to the last element will be invalidated. Other
@@ -1814,7 +1814,7 @@ inline void Vector<T, inlineCapacity, Allocator>::prependVector(
}
template <typename T, size_t inlineCapacity, typename Allocator>
-inline void Vector<T, inlineCapacity, Allocator>::remove(size_t position) {
+inline void Vector<T, inlineCapacity, Allocator>::erase(size_t position) {
RELEASE_ASSERT(position < size());
T* spot = begin() + position;
spot->~T();
@@ -1825,8 +1825,8 @@ inline void Vector<T, inlineCapacity, Allocator>::remove(size_t position) {
}
template <typename T, size_t inlineCapacity, typename Allocator>
-inline void Vector<T, inlineCapacity, Allocator>::remove(size_t position,
- size_t length) {
+inline void Vector<T, inlineCapacity, Allocator>::erase(size_t position,
+ size_t length) {
SECURITY_DCHECK(position <= size());
if (!length)
return;
« no previous file with comments | « third_party/WebKit/Source/platform/weborigin/SecurityPolicy.cpp ('k') | third_party/WebKit/Source/web/ChromeClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698