summaryrefslogtreecommitdiff
path: root/source/kit/dynamic_array.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/kit/dynamic_array.h')
-rw-r--r--source/kit/dynamic_array.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/kit/dynamic_array.h b/source/kit/dynamic_array.h
index 35dddb3..526fb13 100644
--- a/source/kit/dynamic_array.h
+++ b/source/kit/dynamic_array.h
@@ -59,21 +59,21 @@ void kit_da_resize(kit_da_void_t *array, ptrdiff_t element_size,
/* Append a value to dynamic array.
*/
-#define KIT_DA_APPEND(array_, value_) \
- do { \
- ptrdiff_t const kit_index_back_ = (array_).size; \
- KIT_DA_RESIZE((array_), kit_index_back_ + 1); \
- if (kit_index_back_ < (array_).size) \
- (array_).values[kit_index_back_] = (value_); \
+#define KIT_DA_APPEND(array_, value_) \
+ do { \
+ ptrdiff_t kit_index_back_ = (array_).size; \
+ KIT_DA_RESIZE((array_), kit_index_back_ + 1); \
+ if (kit_index_back_ < (array_).size) \
+ (array_).values[kit_index_back_] = (value_); \
} while (0)
/* Insert a value into dynamic array.
*/
#define KIT_DA_INSERT(array_, index_, value_) \
do { \
- ptrdiff_t kit_i_; \
- ptrdiff_t const kit_index_back_ = (array_).size; \
- ptrdiff_t const kit_indert_n_ = (index_); \
+ ptrdiff_t kit_i_; \
+ ptrdiff_t kit_index_back_ = (array_).size; \
+ ptrdiff_t kit_indert_n_ = (index_); \
KIT_DA_RESIZE((array_), kit_index_back_ + 1); \
if (kit_index_back_ + 1 == (array_).size) { \
for (kit_i_ = kit_index_back_; kit_i_ > kit_indert_n_; \