From ad5eb982de97d982bc808ece89903d1113ab9917 Mon Sep 17 00:00:00 2001 From: Mosder Date: Fri, 31 Jul 2026 20:59:31 +0200 Subject: refactor: apparently when you add , after last item in struct initalization it doesn't get formatted like shit by clang. crazy shit --- analyzer/structures/array.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'analyzer/structures/array.c') diff --git a/analyzer/structures/array.c b/analyzer/structures/array.c index ecdc0df..7c7d4f8 100644 --- a/analyzer/structures/array.c +++ b/analyzer/structures/array.c @@ -6,16 +6,13 @@ #include "utils/memory.h" DynArray array_new(size_t el_size, size_t capacity, void (*el_cleanup)(void *el)) { - // clang-format off - DynArray array = { + return (DynArray){ .data = safe_malloc(capacity * el_size), .el_size = el_size, .count = 0, .capacity = capacity, - .el_cleanup = el_cleanup + .el_cleanup = el_cleanup, }; - // clang-format on - return array; } void *array_get(DynArray array, size_t index) { -- cgit v1.2.3