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

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

Issue 2749753002: Migrate WTF::Deque::removeFirst() to ::pop_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
Index: third_party/WebKit/Source/wtf/Deque.h
diff --git a/third_party/WebKit/Source/wtf/Deque.h b/third_party/WebKit/Source/wtf/Deque.h
index 7d3689a16d51d0b4c512e2af01f5b9509ff7bc4f..8a3acd68632bfb7501e1df6636e6e1336bf44f05 100644
--- a/third_party/WebKit/Source/wtf/Deque.h
+++ b/third_party/WebKit/Source/wtf/Deque.h
@@ -127,7 +127,6 @@ class Deque : public ConditionalDestructor<Deque<T, INLINE_CAPACITY, Allocator>,
template <typename U>
void prepend(U&&);
- void removeFirst();
void remove(iterator&);
void remove(const_iterator&);
@@ -139,7 +138,7 @@ class Deque : public ConditionalDestructor<Deque<T, INLINE_CAPACITY, Allocator>,
prepend(std::forward<U>(u));
}
void pop_back();
- void pop_front() { removeFirst(); }
+ void pop_front();
bool empty() const { return isEmpty(); }
T& front() { return first(); }
const T& front() const { return first(); }
@@ -486,7 +485,7 @@ void Deque<T, inlineCapacity, Allocator>::expandCapacity() {
template <typename T, size_t inlineCapacity, typename Allocator>
inline T Deque<T, inlineCapacity, Allocator>::takeFirst() {
T oldFirst = std::move(first());
- removeFirst();
+ pop_front();
return oldFirst;
}
@@ -544,7 +543,7 @@ inline void Deque<T, inlineCapacity, Allocator>::emplace_front(Args&&... args) {
}
template <typename T, size_t inlineCapacity, typename Allocator>
-inline void Deque<T, inlineCapacity, Allocator>::removeFirst() {
+inline void Deque<T, inlineCapacity, Allocator>::pop_front() {
DCHECK(!isEmpty());
TypeOperations::destruct(&m_buffer.buffer()[m_start],
&m_buffer.buffer()[m_start + 1]);

Powered by Google App Engine
This is Rietveld 408576698