| Index: src/list.h
|
| diff --git a/src/list.h b/src/list.h
|
| index d64256887b1d2822e9e571cc31ded21f87fa7d47..0e4e35bb41b78b3ff5aa8b106ea284d1e4ded91c 100644
|
| --- a/src/list.h
|
| +++ b/src/list.h
|
| @@ -48,15 +48,13 @@ namespace internal {
|
| // template <typename T,
|
| // class AllocationPolicy = FreeStoreAllocationPolicy> class List;
|
| template <typename T, class AllocationPolicy>
|
| -class List : private AllocationPolicy::Deleter {
|
| +class List {
|
| public:
|
| - explicit List(AllocationPolicy allocator = AllocationPolicy())
|
| - : AllocationPolicy::Deleter(allocator) {
|
| + explicit List(AllocationPolicy allocator = AllocationPolicy()) {
|
| Initialize(0, allocator);
|
| }
|
| INLINE(explicit List(int capacity,
|
| - AllocationPolicy allocator = AllocationPolicy()))
|
| - : AllocationPolicy::Deleter(allocator) {
|
| + AllocationPolicy allocator = AllocationPolicy())) {
|
| Initialize(capacity, allocator);
|
| }
|
| INLINE(~List()) { DeleteData(data_); }
|
| @@ -73,7 +71,7 @@ class List : private AllocationPolicy::Deleter {
|
| return allocator.New(static_cast<int>(size));
|
| }
|
| INLINE(void operator delete(void* p)) {
|
| - AllocationPolicy::Deleter::Delete(p);
|
| + AllocationPolicy::Delete(p);
|
| }
|
|
|
| // Please the MSVC compiler. We should never have to execute this.
|
| @@ -81,13 +79,6 @@ class List : private AllocationPolicy::Deleter {
|
| UNREACHABLE();
|
| }
|
|
|
| - // Delete via the instance Deleter
|
| - static void Delete(List* p) {
|
| - if (p == NULL) return;
|
| - p->~List();
|
| - p->AllocationPolicy::Deleter::Delete(p);
|
| - }
|
| -
|
| // Returns a reference to the element at index i. This reference is
|
| // not safe to use after operations that can change the list's
|
| // backing store (e.g. Add).
|
| @@ -188,7 +179,7 @@ class List : private AllocationPolicy::Deleter {
|
| return static_cast<T*>(allocator.New(n * sizeof(T)));
|
| }
|
| INLINE(void DeleteData(T* data)) {
|
| - this->AllocationPolicy::Deleter::Delete(data);
|
| + AllocationPolicy::Delete(data);
|
| }
|
|
|
| // Increase the capacity of a full list, and add an element.
|
|
|