From f74cf52946f4e569a26bc81105537b40be95c2c7 Mon Sep 17 00:00:00 2001 From: omnisci3nce Date: Fri, 12 Jul 2024 12:47:07 +1000 Subject: wip: big makeover --- src/std/containers/darray.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/std/containers/darray.h') diff --git a/src/std/containers/darray.h b/src/std/containers/darray.h index b15d269..b3dbd06 100644 --- a/src/std/containers/darray.h +++ b/src/std/containers/darray.h @@ -86,6 +86,7 @@ size_t new_capacity = \ d->capacity > 0 ? d->capacity * DARRAY_RESIZE_FACTOR : DARRAY_DEFAULT_CAPACITY; \ T *resized = Type##_darray_resize(d, new_capacity); \ + (void)resized; \ } \ \ d->data[d->len] = value; \ @@ -97,6 +98,7 @@ size_t new_capacity = \ d->capacity > 0 ? d->capacity * DARRAY_RESIZE_FACTOR : DARRAY_DEFAULT_CAPACITY; \ T *resized = Type##_darray_resize(d, new_capacity); \ + (void)resized; \ } \ \ T *place = d->data + d->len; \ @@ -116,6 +118,7 @@ size_t new_capacity = \ d->capacity > 0 ? d->capacity * DARRAY_RESIZE_FACTOR : DARRAY_DEFAULT_CAPACITY; \ T *resized = Type##_darray_resize(d, new_capacity); \ + (void)resized; \ } \ \ /* shift existing data after index */ \ @@ -136,14 +139,6 @@ \ PREFIX size_t Type##_darray_len(Type##_darray *d) { return d->len; } \ \ - PREFIX void Type##_darray_print(Type##_darray *d) { \ - printf("len: %zu ", d->len); \ - printf("capacity: %zu\n", d->capacity); \ - for (int i = 0; i < d->len; i++) { \ - printf("Index %d holds value %d\n", i, d->data[i]); \ - } \ - } \ - \ PREFIX Type##_darray_iter Type##_darray_iter_new(Type##_darray *d) { \ Type##_darray_iter iterator; \ iterator.array = d; \ -- cgit v1.2.3-70-g09d2