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

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

Issue 2459003003: WTF/std normalization: replace WTF::Vector::removeLast with ::pop_back (Closed)
Patch Set: rebase Created 4 years, 1 month 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/web/WebViewImpl.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 /* 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 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 template <typename U> 962 template <typename U>
963 void prepend(const U*, size_t); 963 void prepend(const U*, size_t);
964 template <typename U> 964 template <typename U>
965 void prepend(U&&); 965 void prepend(U&&);
966 template <typename U, size_t c, typename V> 966 template <typename U, size_t c, typename V>
967 void prependVector(const Vector<U, c, V>&); 967 void prependVector(const Vector<U, c, V>&);
968 968
969 void remove(size_t position); 969 void remove(size_t position);
970 void remove(size_t position, size_t length); 970 void remove(size_t position, size_t length);
971 971
972 void removeLast() { 972 void pop_back() {
973 ASSERT(!isEmpty()); 973 ASSERT(!isEmpty());
974 shrink(size() - 1); 974 shrink(size() - 1);
975 } 975 }
976 976
977 Vector(size_t size, const T& val) : Base(size) { 977 Vector(size_t size, const T& val) : Base(size) {
978 ANNOTATE_NEW_BUFFER(begin(), capacity(), size); 978 ANNOTATE_NEW_BUFFER(begin(), capacity(), size);
979 m_size = size; 979 m_size = size;
980 TypeOperations::uninitializedFill(begin(), end(), val); 980 TypeOperations::uninitializedFill(begin(), end(), val);
981 } 981 }
982 982
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 visitor, *const_cast<T*>(bufferEntry)); 1604 visitor, *const_cast<T*>(bufferEntry));
1605 checkUnusedSlots(buffer() + size(), buffer() + capacity()); 1605 checkUnusedSlots(buffer() + size(), buffer() + capacity());
1606 } 1606 }
1607 } 1607 }
1608 1608
1609 } // namespace WTF 1609 } // namespace WTF
1610 1610
1611 using WTF::Vector; 1611 using WTF::Vector;
1612 1612
1613 #endif // WTF_Vector_h 1613 #endif // WTF_Vector_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698