Commit 810026b4 by Corentin Wallez Committed by Commit Bot

translator: Make TVector and TMap pool allocated

Their content was using the pool allocation but not the container object. BUG=angleproject:1827 Change-Id: I3867023b3f0c4f612f2b82db7034ea3a3dde32a2 Reviewed-on: https://chromium-review.googlesource.com/436084Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
parent 25aef453
...@@ -68,6 +68,8 @@ template <class T> ...@@ -68,6 +68,8 @@ template <class T>
class TVector : public std::vector<T, pool_allocator<T>> class TVector : public std::vector<T, pool_allocator<T>>
{ {
public: public:
POOL_ALLOCATOR_NEW_DELETE();
typedef typename std::vector<T, pool_allocator<T>>::size_type size_type; typedef typename std::vector<T, pool_allocator<T>>::size_type size_type;
TVector() : std::vector<T, pool_allocator<T>>() {} TVector() : std::vector<T, pool_allocator<T>>() {}
TVector(const pool_allocator<T> &a) : std::vector<T, pool_allocator<T>>(a) {} TVector(const pool_allocator<T> &a) : std::vector<T, pool_allocator<T>>(a) {}
...@@ -78,6 +80,7 @@ template <class K, class D, class CMP = std::less<K>> ...@@ -78,6 +80,7 @@ template <class K, class D, class CMP = std::less<K>>
class TMap : public std::map<K, D, CMP, pool_allocator<std::pair<const K, D>>> class TMap : public std::map<K, D, CMP, pool_allocator<std::pair<const K, D>>>
{ {
public: public:
POOL_ALLOCATOR_NEW_DELETE();
typedef pool_allocator<std::pair<const K, D>> tAllocator; typedef pool_allocator<std::pair<const K, D>> tAllocator;
TMap() : std::map<K, D, CMP, tAllocator>() {} TMap() : std::map<K, D, CMP, tAllocator>() {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment