Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- src/include/fst/memory.h
- +++ src/include/fst/memory.h
- @@ -241,7 +241,8 @@ class BlockAllocator {
- if (n * kAllocFit <= kAllocSize) {
- return static_cast<T *>(Arena()->Allocate(n));
- } else {
- - return Allocator().allocate(n, hint);
- + auto alloc = Allocator();
- + return std::allocator_traits<Allocator>::allocate(alloc, n, hint);
- }
- }
- @@ -307,7 +308,8 @@ class PoolAllocator {
- } else if (n <= 64) {
- return static_cast<T *>(Pool<64>()->Allocate());
- } else {
- - return Allocator().allocate(n, hint);
- + auto alloc = Allocator();
- + return std::allocator_traits<Allocator>::allocate(alloc, n, hint);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment