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

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

Issue 2752593003: Migrate WTF::Deque::first() to ::front() (Closed)
Patch Set: one more 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/platform/heap/HeapTest.cpp ('k') | third_party/WebKit/Source/wtf/DequeTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8a3acd68632bfb7501e1df6636e6e1336bf44f05..43f8559fb317780fdb7462a84a44c67f784060e6 100644
--- a/third_party/WebKit/Source/wtf/Deque.h
+++ b/third_party/WebKit/Source/wtf/Deque.h
@@ -89,11 +89,11 @@ class Deque : public ConditionalDestructor<Deque<T, INLINE_CAPACITY, Allocator>,
return const_reverse_iterator(begin());
}
- T& first() {
+ T& front() {
DCHECK_NE(m_start, m_end);
return m_buffer.buffer()[m_start];
}
- const T& first() const {
+ const T& front() const {
DCHECK_NE(m_start, m_end);
return m_buffer.buffer()[m_start];
}
@@ -140,8 +140,6 @@ class Deque : public ConditionalDestructor<Deque<T, INLINE_CAPACITY, Allocator>,
void pop_back();
void pop_front();
bool empty() const { return isEmpty(); }
- T& front() { return first(); }
- const T& front() const { return first(); }
T& back() { return last(); }
const T& back() const { return last(); }
template <typename... Args>
@@ -484,7 +482,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());
+ T oldFirst = std::move(front());
pop_front();
return oldFirst;
}
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapTest.cpp ('k') | third_party/WebKit/Source/wtf/DequeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698