diff options
author | omnisci3nce <omniscient.oce@gmail.com> | 2024-07-12 12:47:07 +1000 |
---|---|---|
committer | omnisci3nce <omniscient.oce@gmail.com> | 2024-07-12 12:47:07 +1000 |
commit | f74cf52946f4e569a26bc81105537b40be95c2c7 (patch) | |
tree | 1d000367350d0e28eb7cfbc800286a0ed30a4e6c /src/std/containers/darray.h | |
parent | fedba7ff68924ff50022405fc9103a5acf7013fe (diff) |
wip: big makeover
Diffstat (limited to 'src/std/containers/darray.h')
-rw-r--r-- | src/std/containers/darray.h | 11 |
1 files changed, 3 insertions, 8 deletions
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; \ |