From 82515f9d90ac149984013f0d64c1cab37b349b29 Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Fri, 19 Jul 2024 14:33:34 +1000 Subject: chore clang format + tidy --- src/std/mem.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/std/mem.h') diff --git a/src/std/mem.h b/src/std/mem.h index 789cba3..c9346cc 100644 --- a/src/std/mem.h +++ b/src/std/mem.h @@ -71,21 +71,21 @@ void void_pool_dealloc(void_pool* pool, u32 raw_handle); // TODO: macro that lets us specialise /* typedef struct Name##_handle Name##_handle; \ */ -#define TYPED_POOL(T, Name) \ - typedef struct Name##_pool { \ - void_pool inner; \ - } Name##_pool; \ - \ - static Name##_pool Name##_pool_create(arena* a, u64 cap, u64 entry_size) { \ - void_pool p = void_pool_create(a, "\"" #Name "\"", cap, entry_size); \ - return (Name##_pool){ .inner = p }; \ - } \ +#define TYPED_POOL(T, Name) \ + typedef struct Name##_pool { \ + void_pool inner; \ + } Name##_pool; \ + \ + static Name##_pool Name##_pool_create(arena* a, u64 cap, u64 entry_size) { \ + void_pool p = void_pool_create(a, "\"" #Name "\"", cap, entry_size); \ + return (Name##_pool){ .inner = p }; \ + } \ static inline T* Name##_pool_get(Name##_pool* pool, Name##Handle handle) { \ - return (T*)void_pool_get(&pool->inner, handle.raw); \ - } \ + return (T*)void_pool_get(&pool->inner, handle.raw); \ + } \ static inline T* Name##_pool_alloc(Name##_pool* pool, Name##Handle* out_handle) { \ - return (T*)void_pool_alloc(&pool->inner, &out_handle->raw); \ - } \ + return (T*)void_pool_alloc(&pool->inner, &out_handle->raw); \ + } \ static inline void Name##_pool_dealloc(Name##_pool* pool, Name##Handle handle) { \ - void_pool_dealloc(&pool->inner, handle.raw); \ + void_pool_dealloc(&pool->inner, handle.raw); \ }\ -- cgit v1.2.3-70-g09d2