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

Side by Side Diff: third_party/WebKit/Source/platform/wtf/RefVector.h

Issue 2788683005: Migrate WTF::RefVector::append() to ::push_back() (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef RefVector_h 5 #ifndef RefVector_h
6 #define RefVector_h 6 #define RefVector_h
7 7
8 #include "platform/wtf/RefCounted.h" 8 #include "platform/wtf/RefCounted.h"
9 #include "platform/wtf/RefPtr.h" 9 #include "platform/wtf/RefPtr.h"
10 #include "platform/wtf/Vector.h" 10 #include "platform/wtf/Vector.h"
(...skipping 15 matching lines...) Expand all
26 const T& operator[](size_t i) const { return m_vector[i]; } 26 const T& operator[](size_t i) const { return m_vector[i]; }
27 T& operator[](size_t i) { return m_vector[i]; } 27 T& operator[](size_t i) { return m_vector[i]; }
28 const T& at(size_t i) const { return m_vector.at(i); } 28 const T& at(size_t i) const { return m_vector.at(i); }
29 T& at(size_t i) { return m_vector.at(i); } 29 T& at(size_t i) { return m_vector.at(i); }
30 30
31 bool operator==(const RefVector& o) const { return m_vector == o.m_vector; } 31 bool operator==(const RefVector& o) const { return m_vector == o.m_vector; }
32 bool operator!=(const RefVector& o) const { return m_vector != o.m_vector; } 32 bool operator!=(const RefVector& o) const { return m_vector != o.m_vector; }
33 33
34 size_t size() const { return m_vector.size(); } 34 size_t size() const { return m_vector.size(); }
35 bool isEmpty() const { return !size(); } 35 bool isEmpty() const { return !size(); }
36 void append(const T& decoration) { m_vector.push_back(decoration); } 36 void push_back(const T& decoration) { m_vector.push_back(decoration); }
37 const Vector<T>& vector() const { return m_vector; } 37 const Vector<T>& vector() const { return m_vector; }
38 38
39 private: 39 private:
40 Vector<T> m_vector; 40 Vector<T> m_vector;
41 RefVector() {} 41 RefVector() {}
42 RefVector(const Vector<T>& vector) : m_vector(vector) {} 42 RefVector(const Vector<T>& vector) : m_vector(vector) {}
43 RefVector(Vector<T>&& vector) : m_vector(vector) {} 43 RefVector(Vector<T>&& vector) : m_vector(vector) {}
44 }; 44 };
45 45
46 } // namespace blink 46 } // namespace blink
47 47
48 #endif // RefVector_h 48 #endif // RefVector_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698