diff options
Diffstat (limited to 'src/3rdparty/angle/src/compiler/translator/PoolAlloc.h')
-rw-r--r-- | src/3rdparty/angle/src/compiler/translator/PoolAlloc.h | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/src/3rdparty/angle/src/compiler/translator/PoolAlloc.h b/src/3rdparty/angle/src/compiler/translator/PoolAlloc.h index 6cd8d30114..dab2926c90 100644 --- a/src/3rdparty/angle/src/compiler/translator/PoolAlloc.h +++ b/src/3rdparty/angle/src/compiler/translator/PoolAlloc.h @@ -247,18 +247,13 @@ public: pointer address(reference x) const { return &x; } const_pointer address(const_reference x) const { return &x; } - pool_allocator() : allocator(GetGlobalPoolAllocator()) { } - pool_allocator(TPoolAllocator& a) : allocator(&a) { } - pool_allocator(const pool_allocator<T>& p) : allocator(p.allocator) { } - - template <class Other> - pool_allocator<T>& operator=(const pool_allocator<Other>& p) { - allocator = p.allocator; - return *this; - } + pool_allocator() { } template<class Other> - pool_allocator(const pool_allocator<Other>& p) : allocator(&p.getAllocator()) { } + pool_allocator(const pool_allocator<Other>& p) { } + + template <class Other> + pool_allocator<T>& operator=(const pool_allocator<Other>& p) { return *this; } #if defined(__SUNPRO_CC) && !defined(_RWSTD_ALLOCATOR) // libCStd on some platforms have a different allocate/deallocate interface. @@ -284,17 +279,13 @@ public: void construct(pointer p, const T& val) { new ((void *)p) T(val); } void destroy(pointer p) { p->T::~T(); } - bool operator==(const pool_allocator& rhs) const { return &getAllocator() == &rhs.getAllocator(); } - bool operator!=(const pool_allocator& rhs) const { return &getAllocator() != &rhs.getAllocator(); } + bool operator==(const pool_allocator& rhs) const { return true; } + bool operator!=(const pool_allocator& rhs) const { return false; } size_type max_size() const { return static_cast<size_type>(-1) / sizeof(T); } size_type max_size(int size) const { return static_cast<size_type>(-1) / size; } - void setAllocator(TPoolAllocator* a) { allocator = a; } - TPoolAllocator& getAllocator() const { return *allocator; } - -protected: - TPoolAllocator* allocator; + TPoolAllocator& getAllocator() const { return *GetGlobalPoolAllocator(); } }; #endif // COMPILER_TRANSLATOR_POOLALLOC_H_ |