OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |