From f8f8d483f62cfabdada34c2b24509bbe457e87ef Mon Sep 17 00:00:00 2001 From: Fabrice Date: Mon, 2 Mar 2026 12:45:50 +0100 Subject: working on array and fixing errors --- src/array.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/array.cc') diff --git a/src/array.cc b/src/array.cc index 7c8cc19..06b79c2 100644 --- a/src/array.cc +++ b/src/array.cc @@ -12,13 +12,14 @@ struct Array { const Allocator* allocator; }; -#define array_init(T, allocator) Array{Slice{}, allocator} +#define array_init(T, allocator) \ + Array { Slice{}, allocator } -template +template void array_deinit(Array* array) { assert(array != nullptr); - if(unlikely(array->allocator == nullptr)) return; + if (unlikely(array->allocator == nullptr)) return; slice_deallocate(array->allocator, &array->buffer); array->allocator = nullptr; -- cgit v1.2.3