From 0ff951307014dc06653caf9a3919147fe9110402 Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Mon, 4 Mar 2024 10:39:19 -0500 Subject: [PATCH] alloc fixes --- include/blt/std/allocator.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/blt/std/allocator.h b/include/blt/std/allocator.h index 51c79b4..f310c9d 100644 --- a/include/blt/std/allocator.h +++ b/include/blt/std/allocator.h @@ -360,14 +360,14 @@ namespace blt * @tparam ALLOC allocator to use for any allocations. In the case of the non-linked variant, this will be used if a size is supplied. The supplied buffer must be allocated with this allocator! * @tparam linked use a linked list to allocate with the allocator or just use the supplied buffer and throw an exception of we cannot allocate */ - template, bool linked = true> + template typename ALLOC = std::allocator> class bump_allocator; - template - class bump_allocator + template typename ALLOC> + class bump_allocator { private: - ALLOC allocator; + ALLOC allocator; blt::u8* buffer_; blt::u8* offset_; blt::size_t size_; @@ -416,8 +416,8 @@ namespace blt } }; - template - class bump_allocator + template typename ALLOC> + class bump_allocator { private: struct block @@ -427,8 +427,8 @@ namespace blt blt::size_t allocated_objects = 0; blt::size_t deallocated_objects = 0; }; - ALLOC allocator; - std::vector> blocks; + ALLOC allocator; + std::vector> blocks; blt::size_t size_; void expand()