Skip to content

Commit

Permalink
clean compile
Browse files Browse the repository at this point in the history
  • Loading branch information
kspalaiologos committed Jan 3, 2021
1 parent a23e676 commit 060e9c0
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,19 @@
} \
} while (0)

#define vector_insert(vec, idx, n) \
do { \
if(vec) { \
size_t cv_cap = vector_capacity(vec); \
if (cv_cap <= vector_size(vec)) { \
vector_grow((vec), cv_cap + 32); \
} \
for(size_t cv = vector_size(vec); cv > idx; cv--) { \
(vec)[cv] = (vec)[cv - 1]; \
} \
(vec)[idx] = n; \
_internal_vecsiz((vec), vector_size(vec) + 1); \
} \
#define vector_insert(vec, idx, n) \
do { \
if(vec) { \
size_t cv_cap = vector_capacity(vec); \
if (cv_cap <= vector_size(vec)) { \
vector_grow((vec), cv_cap + 32); \
} \
for(size_t cv = vector_size(vec); cv > (uintptr_t) (idx); cv--) { \
(vec)[cv] = (vec)[cv - 1]; \
} \
(vec)[idx] = n; \
_internal_vecsiz((vec), vector_size(vec) + 1); \
} \
} while (0)

#define vector_begin(vec) \
Expand Down

0 comments on commit 060e9c0

Please sign in to comment.