diff options
Diffstat (limited to 'src/array.cc')
| -rw-r--r-- | src/array.cc | 7 |
1 files changed, 4 insertions, 3 deletions
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<T>{Slice<T>{}, allocator} +#define array_init(T, allocator) \ + Array<T> { Slice<T>{}, allocator } -template<typename T> +template <typename T> void array_deinit(Array<T>* 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; |
