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

Side by Side Diff: third_party/WebKit/Source/wtf/Vector.h

Issue 2470233009: WTF/std normalization: replace WTF::Vector::first() with ::front() (Closed)
Patch Set: rebase Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 909
910 reverse_iterator rbegin() { return reverse_iterator(end()); } 910 reverse_iterator rbegin() { return reverse_iterator(end()); }
911 reverse_iterator rend() { return reverse_iterator(begin()); } 911 reverse_iterator rend() { return reverse_iterator(begin()); }
912 const_reverse_iterator rbegin() const { 912 const_reverse_iterator rbegin() const {
913 return const_reverse_iterator(end()); 913 return const_reverse_iterator(end());
914 } 914 }
915 const_reverse_iterator rend() const { 915 const_reverse_iterator rend() const {
916 return const_reverse_iterator(begin()); 916 return const_reverse_iterator(begin());
917 } 917 }
918 918
919 T& first() { return at(0); } 919 T& front() { return at(0); }
920 const T& first() const { return at(0); } 920 const T& front() const { return at(0); }
921 T& back() { return at(size() - 1); } 921 T& back() { return at(size() - 1); }
922 const T& back() const { return at(size() - 1); } 922 const T& back() const { return at(size() - 1); }
923 923
924 template <typename U> 924 template <typename U>
925 bool contains(const U&) const; 925 bool contains(const U&) const;
926 template <typename U> 926 template <typename U>
927 size_t find(const U&) const; 927 size_t find(const U&) const;
928 template <typename U> 928 template <typename U>
929 size_t reverseFind(const U&) const; 929 size_t reverseFind(const U&) const;
930 930
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
1605 visitor, *const_cast<T*>(bufferEntry)); 1605 visitor, *const_cast<T*>(bufferEntry));
1606 checkUnusedSlots(buffer() + size(), buffer() + capacity()); 1606 checkUnusedSlots(buffer() + size(), buffer() + capacity());
1607 } 1607 }
1608 } 1608 }
1609 1609
1610 } // namespace WTF 1610 } // namespace WTF
1611 1611
1612 using WTF::Vector; 1612 using WTF::Vector;
1613 1613
1614 #endif // WTF_Vector_h 1614 #endif // WTF_Vector_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/HashMapTest.cpp ('k') | third_party/WebKit/Source/wtf/VectorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698