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

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

Issue 2766723002: Migrate WTF::Vector::prepend() to ::push_front() (Closed)
Patch Set: 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/HexNumber.h ('k') | third_party/WebKit/Source/wtf/VectorTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/Vector.h
diff --git a/third_party/WebKit/Source/wtf/Vector.h b/third_party/WebKit/Source/wtf/Vector.h
index 83b68093700736c88d086de3d55e5c4d1c66613e..1a7bba1318fbd6653d3ce85060c99955c4a0ad3d 100644
--- a/third_party/WebKit/Source/wtf/Vector.h
+++ b/third_party/WebKit/Source/wtf/Vector.h
@@ -1152,16 +1152,16 @@ class Vector
// All of these functions may cause a reallocation. In any case, all the
// iterators pointing to any element in the vector will be invalidated.
//
- // prepend(value)
+ // push_front(value)
// Insert a single element to the front.
- // prepend(buffer, size)
+ // push_front(buffer, size)
// prependVector(vector)
// Insert multiple elements represented by either |buffer| and |size| or
// |vector| to the front. The elements will be copied.
template <typename U>
- void prepend(U&&);
+ void push_front(U&&);
template <typename U>
- void prepend(const U*, size_t);
+ void push_front(const U*, size_t);
template <typename U, size_t otherCapacity, typename OtherAllocator>
void prependVector(const Vector<U, otherCapacity, OtherAllocator>&);
@@ -1795,14 +1795,14 @@ inline void Vector<T, inlineCapacity, Allocator>::insert(
template <typename T, size_t inlineCapacity, typename Allocator>
template <typename U>
-inline void Vector<T, inlineCapacity, Allocator>::prepend(U&& val) {
+inline void Vector<T, inlineCapacity, Allocator>::push_front(U&& val) {
insert(0, std::forward<U>(val));
}
template <typename T, size_t inlineCapacity, typename Allocator>
template <typename U>
-void Vector<T, inlineCapacity, Allocator>::prepend(const U* data,
- size_t dataSize) {
+void Vector<T, inlineCapacity, Allocator>::push_front(const U* data,
+ size_t dataSize) {
insert(0, data, dataSize);
}
« no previous file with comments | « third_party/WebKit/Source/wtf/HexNumber.h ('k') | third_party/WebKit/Source/wtf/VectorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698