diff options
Diffstat (limited to 'libdimension/dimension/array.h')
-rw-r--r-- | libdimension/dimension/array.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libdimension/dimension/array.h b/libdimension/dimension/array.h index 09746dd..10afa9c 100644 --- a/libdimension/dimension/array.h +++ b/libdimension/dimension/array.h @@ -241,9 +241,9 @@ dmnsn_array_remove(dmnsn_array *array, size_t i) * @param i The name of the iterator within the loop body. * @param[in] array The array to loop over. */ -#define DMNSN_ARRAY_FOREACH(type, i, array) \ - for (type i = dmnsn_array_first(array); \ - i - (type)dmnsn_array_first(array) < dmnsn_array_size(array); \ +#define DMNSN_ARRAY_FOREACH(type, i, array) \ + for (type i = dmnsn_array_first(array); \ + (size_t)(i - (type)dmnsn_array_first(array)) < dmnsn_array_size(array); \ ++i) /** |