diff options
| author | Mosder <xmosder12@gmail.com> | 2026-07-31 20:59:31 +0200 |
|---|---|---|
| committer | Mosder <xmosder12@gmail.com> | 2026-07-31 20:59:31 +0200 |
| commit | ad5eb982de97d982bc808ece89903d1113ab9917 (patch) | |
| tree | acbb6865248f14d4faa16759943cefcceb94667b /analyzer/structures | |
| parent | 4624152ac63ca3b4cbba0998d54fb0da84daef8c (diff) | |
refactor: apparently when you add , after last item in struct initalization it doesn't get formatted like shit by clang. crazy shit
Diffstat (limited to 'analyzer/structures')
| -rw-r--r-- | analyzer/structures/array.c | 7 |
1 files changed, 2 insertions, 5 deletions
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) { |
