| 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 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 }; | 794 }; |
| 795 // Heap-allocated vectors with no inlineCapacity never need a destructor. | 795 // Heap-allocated vectors with no inlineCapacity never need a destructor. |
| 796 template <typename T, | 796 template <typename T, |
| 797 size_t inlineCapacity = 0, | 797 size_t inlineCapacity = 0, |
| 798 typename Allocator = PartitionAllocator> | 798 typename Allocator = PartitionAllocator> |
| 799 class Vector | 799 class Vector |
| 800 : private VectorBuffer<T, INLINE_CAPACITY, Allocator>, | 800 : private VectorBuffer<T, INLINE_CAPACITY, Allocator>, |
| 801 public ConditionalDestructor<Vector<T, INLINE_CAPACITY, Allocator>, | 801 public ConditionalDestructor<Vector<T, INLINE_CAPACITY, Allocator>, |
| 802 (INLINE_CAPACITY == 0) && | 802 (INLINE_CAPACITY == 0) && |
| 803 Allocator::isGarbageCollected> { | 803 Allocator::isGarbageCollected> { |
| 804 WTF_USE_ALLOCATOR(Vector, Allocator); | 804 USE_ALLOCATOR(Vector, Allocator); |
| 805 using Base = VectorBuffer<T, INLINE_CAPACITY, Allocator>; | 805 using Base = VectorBuffer<T, INLINE_CAPACITY, Allocator>; |
| 806 using TypeOperations = VectorTypeOperations<T>; | 806 using TypeOperations = VectorTypeOperations<T>; |
| 807 using OffsetRange = typename Base::OffsetRange; | 807 using OffsetRange = typename Base::OffsetRange; |
| 808 | 808 |
| 809 public: | 809 public: |
| 810 typedef T ValueType; | 810 typedef T ValueType; |
| 811 typedef T value_type; | 811 typedef T value_type; |
| 812 | 812 |
| 813 typedef T* iterator; | 813 typedef T* iterator; |
| 814 typedef const T* const_iterator; | 814 typedef const T* const_iterator; |
| (...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1618 visitor, *const_cast<T*>(bufferEntry)); | 1618 visitor, *const_cast<T*>(bufferEntry)); |
| 1619 checkUnusedSlots(buffer() + size(), buffer() + capacity()); | 1619 checkUnusedSlots(buffer() + size(), buffer() + capacity()); |
| 1620 } | 1620 } |
| 1621 } | 1621 } |
| 1622 | 1622 |
| 1623 } // namespace WTF | 1623 } // namespace WTF |
| 1624 | 1624 |
| 1625 using WTF::Vector; | 1625 using WTF::Vector; |
| 1626 | 1626 |
| 1627 #endif // WTF_Vector_h | 1627 #endif // WTF_Vector_h |
| OLD | NEW |