Skip to content

Commit 9097df8

Browse files
committed
v.h: Use T_arr_add_n() in T_arr_join()
This was missing from the implementation I had copied to v.h earlier, it was originally implemented in c-ray in c519299
1 parent a76aca9 commit 9097df8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

include/v.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,7 @@ static inline size_t grow_x_2(size_t capacity, size_t elem_size) {
155155
} \
156156
static inline void V_UNUSED T##_arr_join(struct T##_arr *a, struct T##_arr *b) { \
157157
if (!a || !b) return; \
158-
for (size_t i = 0; i < b->count; ++i) \
159-
T##_arr_add(a, b->items[i]); \
158+
T##_arr_add_n(a, b->items, b->count); \
160159
T##_arr_free(b); \
161160
}
162161

0 commit comments

Comments
 (0)