Use passed in allocator.

This commit is contained in:
supperpiccle 2023-01-11 10:00:24 -06:00 committed by Milo Yip
parent 1ce516e50b
commit 012be85287
1 changed files with 2 additions and 2 deletions

View File

@ -620,9 +620,9 @@ public:
if (v->IsArray() && v->Size() > 0) {
enum_ = static_cast<uint64_t*>(allocator_->Malloc(sizeof(uint64_t) * v->Size()));
for (ConstValueIterator itr = v->Begin(); itr != v->End(); ++itr) {
typedef Hasher<EncodingType, MemoryPoolAllocator<> > EnumHasherType;
typedef Hasher<EncodingType, MemoryPoolAllocator<AllocatorType> > EnumHasherType;
char buffer[256u + 24];
MemoryPoolAllocator<> hasherAllocator(buffer, sizeof(buffer));
MemoryPoolAllocator<AllocatorType> hasherAllocator(buffer, sizeof(buffer));
EnumHasherType h(&hasherAllocator, 256);
itr->Accept(h);
enum_[enumCount_++] = h.GetHashCode();