From 9e8caf1e06ba7510160305da11a30d91dcfc23e5 Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Fri, 6 Sep 2024 21:10:21 +0200 Subject: reformat source code --- src/arraylist.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/arraylist.c') diff --git a/src/arraylist.c b/src/arraylist.c index 0db35ad..7a62fd4 100644 --- a/src/arraylist.c +++ b/src/arraylist.c @@ -11,7 +11,7 @@ typedef int T; struct ArrayList { - T ** array; + T **array; size_t size; size_t capacity; }; @@ -83,7 +83,7 @@ ArrayList_growIfNeeded(struct ArrayList *arrayList) } else { size_t new_capacity = arrayList->capacity * 3 / 2; // *= 1.5 - T ** new_arrayList = ArrayList_allocateArray(arrayList->array, new_capacity); + T **new_arrayList = ArrayList_allocateArray(arrayList->array, new_capacity); arrayList->capacity = new_capacity; arrayList->array = new_arrayList; @@ -225,7 +225,7 @@ static int ArrayList_bsearchHelper(const void *ctx, const void *el) { const struct bsearchHelper_context *context = ctx; - const const_T_ptr * element = el; + const const_T_ptr *element = el; return context->cmp(context->key, *element, context->args); } @@ -245,7 +245,7 @@ ArrayList_binarySearch(struct ArrayList *arrayList, void *key, int cmp(void *, c T **pos = bsearch(&context, arrayList->array, arrayList->size, sizeof arrayList->array[0], ArrayList_bsearchHelper); if ( pos ) { - *loc = (size_t)(pos - arrayList->array); + *loc = (size_t) (pos - arrayList->array); return true; } else { -- cgit v1.3