|
|
|
@@ -46,9 +46,17 @@ void wapp_str8_array_extend_capped(Str8Array *array, const Str8Array *other) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Str8 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 items_to_add = other->count;
|
|
|
|
|
for (u64 i = 0; i < items_to_add; ++i) {
|
|
|
|
|
item = wapp_str8_array_get(other, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_str8_array_get(other, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < items_to_add;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -81,9 +89,17 @@ void wapp_str8_array_copy_capped(const Str8Array *src, Str8Array *dst) {
|
|
|
|
|
wapp_str8_array_clear(dst);
|
|
|
|
|
|
|
|
|
|
Str8 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 to_copy = src->count < dst->capacity ? src->count : dst->capacity;
|
|
|
|
|
for (u64 i = 0; i < to_copy; ++i) {
|
|
|
|
|
item = wapp_str8_array_get(src, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_str8_array_get(src, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < to_copy;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -218,9 +234,17 @@ void wapp_void_ptr_array_extend_capped(VoidPArray *array, const VoidPArray *othe
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void * *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 items_to_add = other->count;
|
|
|
|
|
for (u64 i = 0; i < items_to_add; ++i) {
|
|
|
|
|
item = wapp_void_ptr_array_get(other, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_void_ptr_array_get(other, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < items_to_add;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -253,9 +277,17 @@ void wapp_void_ptr_array_copy_capped(const VoidPArray *src, VoidPArray *dst) {
|
|
|
|
|
wapp_void_ptr_array_clear(dst);
|
|
|
|
|
|
|
|
|
|
void * *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 to_copy = src->count < dst->capacity ? src->count : dst->capacity;
|
|
|
|
|
for (u64 i = 0; i < to_copy; ++i) {
|
|
|
|
|
item = wapp_void_ptr_array_get(src, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_void_ptr_array_get(src, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < to_copy;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -390,9 +422,17 @@ void wapp_bool_array_extend_capped(BoolArray *array, const BoolArray *other) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 items_to_add = other->count;
|
|
|
|
|
for (u64 i = 0; i < items_to_add; ++i) {
|
|
|
|
|
item = wapp_bool_array_get(other, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_bool_array_get(other, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < items_to_add;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -425,9 +465,17 @@ void wapp_bool_array_copy_capped(const BoolArray *src, BoolArray *dst) {
|
|
|
|
|
wapp_bool_array_clear(dst);
|
|
|
|
|
|
|
|
|
|
bool *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 to_copy = src->count < dst->capacity ? src->count : dst->capacity;
|
|
|
|
|
for (u64 i = 0; i < to_copy; ++i) {
|
|
|
|
|
item = wapp_bool_array_get(src, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_bool_array_get(src, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < to_copy;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -562,9 +610,17 @@ void wapp_char_array_extend_capped(CharArray *array, const CharArray *other) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
char *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 items_to_add = other->count;
|
|
|
|
|
for (u64 i = 0; i < items_to_add; ++i) {
|
|
|
|
|
item = wapp_char_array_get(other, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_char_array_get(other, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < items_to_add;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -597,9 +653,17 @@ void wapp_char_array_copy_capped(const CharArray *src, CharArray *dst) {
|
|
|
|
|
wapp_char_array_clear(dst);
|
|
|
|
|
|
|
|
|
|
char *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 to_copy = src->count < dst->capacity ? src->count : dst->capacity;
|
|
|
|
|
for (u64 i = 0; i < to_copy; ++i) {
|
|
|
|
|
item = wapp_char_array_get(src, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_char_array_get(src, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < to_copy;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -734,9 +798,17 @@ void wapp_c8_array_extend_capped(C8Array *array, const C8Array *other) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
c8 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 items_to_add = other->count;
|
|
|
|
|
for (u64 i = 0; i < items_to_add; ++i) {
|
|
|
|
|
item = wapp_c8_array_get(other, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_c8_array_get(other, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < items_to_add;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -769,9 +841,17 @@ void wapp_c8_array_copy_capped(const C8Array *src, C8Array *dst) {
|
|
|
|
|
wapp_c8_array_clear(dst);
|
|
|
|
|
|
|
|
|
|
c8 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 to_copy = src->count < dst->capacity ? src->count : dst->capacity;
|
|
|
|
|
for (u64 i = 0; i < to_copy; ++i) {
|
|
|
|
|
item = wapp_c8_array_get(src, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_c8_array_get(src, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < to_copy;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -906,9 +986,17 @@ void wapp_c16_array_extend_capped(C16Array *array, const C16Array *other) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
c16 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 items_to_add = other->count;
|
|
|
|
|
for (u64 i = 0; i < items_to_add; ++i) {
|
|
|
|
|
item = wapp_c16_array_get(other, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_c16_array_get(other, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < items_to_add;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -941,9 +1029,17 @@ void wapp_c16_array_copy_capped(const C16Array *src, C16Array *dst) {
|
|
|
|
|
wapp_c16_array_clear(dst);
|
|
|
|
|
|
|
|
|
|
c16 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 to_copy = src->count < dst->capacity ? src->count : dst->capacity;
|
|
|
|
|
for (u64 i = 0; i < to_copy; ++i) {
|
|
|
|
|
item = wapp_c16_array_get(src, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_c16_array_get(src, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < to_copy;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -1078,9 +1174,17 @@ void wapp_c32_array_extend_capped(C32Array *array, const C32Array *other) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
c32 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 items_to_add = other->count;
|
|
|
|
|
for (u64 i = 0; i < items_to_add; ++i) {
|
|
|
|
|
item = wapp_c32_array_get(other, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_c32_array_get(other, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < items_to_add;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -1113,9 +1217,17 @@ void wapp_c32_array_copy_capped(const C32Array *src, C32Array *dst) {
|
|
|
|
|
wapp_c32_array_clear(dst);
|
|
|
|
|
|
|
|
|
|
c32 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 to_copy = src->count < dst->capacity ? src->count : dst->capacity;
|
|
|
|
|
for (u64 i = 0; i < to_copy; ++i) {
|
|
|
|
|
item = wapp_c32_array_get(src, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_c32_array_get(src, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < to_copy;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -1250,9 +1362,17 @@ void wapp_i8_array_extend_capped(I8Array *array, const I8Array *other) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
i8 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 items_to_add = other->count;
|
|
|
|
|
for (u64 i = 0; i < items_to_add; ++i) {
|
|
|
|
|
item = wapp_i8_array_get(other, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_i8_array_get(other, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < items_to_add;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -1285,9 +1405,17 @@ void wapp_i8_array_copy_capped(const I8Array *src, I8Array *dst) {
|
|
|
|
|
wapp_i8_array_clear(dst);
|
|
|
|
|
|
|
|
|
|
i8 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 to_copy = src->count < dst->capacity ? src->count : dst->capacity;
|
|
|
|
|
for (u64 i = 0; i < to_copy; ++i) {
|
|
|
|
|
item = wapp_i8_array_get(src, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_i8_array_get(src, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < to_copy;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -1422,9 +1550,17 @@ void wapp_i16_array_extend_capped(I16Array *array, const I16Array *other) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
i16 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 items_to_add = other->count;
|
|
|
|
|
for (u64 i = 0; i < items_to_add; ++i) {
|
|
|
|
|
item = wapp_i16_array_get(other, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_i16_array_get(other, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < items_to_add;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -1457,9 +1593,17 @@ void wapp_i16_array_copy_capped(const I16Array *src, I16Array *dst) {
|
|
|
|
|
wapp_i16_array_clear(dst);
|
|
|
|
|
|
|
|
|
|
i16 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 to_copy = src->count < dst->capacity ? src->count : dst->capacity;
|
|
|
|
|
for (u64 i = 0; i < to_copy; ++i) {
|
|
|
|
|
item = wapp_i16_array_get(src, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_i16_array_get(src, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < to_copy;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -1594,9 +1738,17 @@ void wapp_i32_array_extend_capped(I32Array *array, const I32Array *other) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
i32 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 items_to_add = other->count;
|
|
|
|
|
for (u64 i = 0; i < items_to_add; ++i) {
|
|
|
|
|
item = wapp_i32_array_get(other, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_i32_array_get(other, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < items_to_add;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -1629,9 +1781,17 @@ void wapp_i32_array_copy_capped(const I32Array *src, I32Array *dst) {
|
|
|
|
|
wapp_i32_array_clear(dst);
|
|
|
|
|
|
|
|
|
|
i32 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 to_copy = src->count < dst->capacity ? src->count : dst->capacity;
|
|
|
|
|
for (u64 i = 0; i < to_copy; ++i) {
|
|
|
|
|
item = wapp_i32_array_get(src, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_i32_array_get(src, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < to_copy;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -1766,9 +1926,17 @@ void wapp_i64_array_extend_capped(I64Array *array, const I64Array *other) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
i64 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 items_to_add = other->count;
|
|
|
|
|
for (u64 i = 0; i < items_to_add; ++i) {
|
|
|
|
|
item = wapp_i64_array_get(other, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_i64_array_get(other, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < items_to_add;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -1801,9 +1969,17 @@ void wapp_i64_array_copy_capped(const I64Array *src, I64Array *dst) {
|
|
|
|
|
wapp_i64_array_clear(dst);
|
|
|
|
|
|
|
|
|
|
i64 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 to_copy = src->count < dst->capacity ? src->count : dst->capacity;
|
|
|
|
|
for (u64 i = 0; i < to_copy; ++i) {
|
|
|
|
|
item = wapp_i64_array_get(src, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_i64_array_get(src, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < to_copy;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -1938,9 +2114,17 @@ void wapp_u8_array_extend_capped(U8Array *array, const U8Array *other) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
u8 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 items_to_add = other->count;
|
|
|
|
|
for (u64 i = 0; i < items_to_add; ++i) {
|
|
|
|
|
item = wapp_u8_array_get(other, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_u8_array_get(other, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < items_to_add;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -1973,9 +2157,17 @@ void wapp_u8_array_copy_capped(const U8Array *src, U8Array *dst) {
|
|
|
|
|
wapp_u8_array_clear(dst);
|
|
|
|
|
|
|
|
|
|
u8 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 to_copy = src->count < dst->capacity ? src->count : dst->capacity;
|
|
|
|
|
for (u64 i = 0; i < to_copy; ++i) {
|
|
|
|
|
item = wapp_u8_array_get(src, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_u8_array_get(src, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < to_copy;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -2110,9 +2302,17 @@ void wapp_u16_array_extend_capped(U16Array *array, const U16Array *other) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
u16 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 items_to_add = other->count;
|
|
|
|
|
for (u64 i = 0; i < items_to_add; ++i) {
|
|
|
|
|
item = wapp_u16_array_get(other, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_u16_array_get(other, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < items_to_add;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -2145,9 +2345,17 @@ void wapp_u16_array_copy_capped(const U16Array *src, U16Array *dst) {
|
|
|
|
|
wapp_u16_array_clear(dst);
|
|
|
|
|
|
|
|
|
|
u16 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 to_copy = src->count < dst->capacity ? src->count : dst->capacity;
|
|
|
|
|
for (u64 i = 0; i < to_copy; ++i) {
|
|
|
|
|
item = wapp_u16_array_get(src, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_u16_array_get(src, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < to_copy;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -2282,9 +2490,17 @@ void wapp_u32_array_extend_capped(U32Array *array, const U32Array *other) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
u32 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 items_to_add = other->count;
|
|
|
|
|
for (u64 i = 0; i < items_to_add; ++i) {
|
|
|
|
|
item = wapp_u32_array_get(other, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_u32_array_get(other, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < items_to_add;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -2317,9 +2533,17 @@ void wapp_u32_array_copy_capped(const U32Array *src, U32Array *dst) {
|
|
|
|
|
wapp_u32_array_clear(dst);
|
|
|
|
|
|
|
|
|
|
u32 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 to_copy = src->count < dst->capacity ? src->count : dst->capacity;
|
|
|
|
|
for (u64 i = 0; i < to_copy; ++i) {
|
|
|
|
|
item = wapp_u32_array_get(src, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_u32_array_get(src, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < to_copy;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -2454,9 +2678,17 @@ void wapp_u64_array_extend_capped(U64Array *array, const U64Array *other) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
u64 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 items_to_add = other->count;
|
|
|
|
|
for (u64 i = 0; i < items_to_add; ++i) {
|
|
|
|
|
item = wapp_u64_array_get(other, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_u64_array_get(other, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < items_to_add;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -2489,9 +2721,17 @@ void wapp_u64_array_copy_capped(const U64Array *src, U64Array *dst) {
|
|
|
|
|
wapp_u64_array_clear(dst);
|
|
|
|
|
|
|
|
|
|
u64 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 to_copy = src->count < dst->capacity ? src->count : dst->capacity;
|
|
|
|
|
for (u64 i = 0; i < to_copy; ++i) {
|
|
|
|
|
item = wapp_u64_array_get(src, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_u64_array_get(src, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < to_copy;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -2626,9 +2866,17 @@ void wapp_f32_array_extend_capped(F32Array *array, const F32Array *other) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
f32 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 items_to_add = other->count;
|
|
|
|
|
for (u64 i = 0; i < items_to_add; ++i) {
|
|
|
|
|
item = wapp_f32_array_get(other, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_f32_array_get(other, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < items_to_add;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -2661,9 +2909,17 @@ void wapp_f32_array_copy_capped(const F32Array *src, F32Array *dst) {
|
|
|
|
|
wapp_f32_array_clear(dst);
|
|
|
|
|
|
|
|
|
|
f32 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 to_copy = src->count < dst->capacity ? src->count : dst->capacity;
|
|
|
|
|
for (u64 i = 0; i < to_copy; ++i) {
|
|
|
|
|
item = wapp_f32_array_get(src, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_f32_array_get(src, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < to_copy;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -2798,9 +3054,17 @@ void wapp_f64_array_extend_capped(F64Array *array, const F64Array *other) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
f64 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 items_to_add = other->count;
|
|
|
|
|
for (u64 i = 0; i < items_to_add; ++i) {
|
|
|
|
|
item = wapp_f64_array_get(other, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_f64_array_get(other, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < items_to_add;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -2833,9 +3097,17 @@ void wapp_f64_array_copy_capped(const F64Array *src, F64Array *dst) {
|
|
|
|
|
wapp_f64_array_clear(dst);
|
|
|
|
|
|
|
|
|
|
f64 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 to_copy = src->count < dst->capacity ? src->count : dst->capacity;
|
|
|
|
|
for (u64 i = 0; i < to_copy; ++i) {
|
|
|
|
|
item = wapp_f64_array_get(src, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_f64_array_get(src, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < to_copy;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -2970,9 +3242,17 @@ void wapp_f128_array_extend_capped(F128Array *array, const F128Array *other) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
f128 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 items_to_add = other->count;
|
|
|
|
|
for (u64 i = 0; i < items_to_add; ++i) {
|
|
|
|
|
item = wapp_f128_array_get(other, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_f128_array_get(other, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < items_to_add;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -3005,9 +3285,17 @@ void wapp_f128_array_copy_capped(const F128Array *src, F128Array *dst) {
|
|
|
|
|
wapp_f128_array_clear(dst);
|
|
|
|
|
|
|
|
|
|
f128 *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 to_copy = src->count < dst->capacity ? src->count : dst->capacity;
|
|
|
|
|
for (u64 i = 0; i < to_copy; ++i) {
|
|
|
|
|
item = wapp_f128_array_get(src, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_f128_array_get(src, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < to_copy;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -3142,9 +3430,17 @@ void wapp_iptr_array_extend_capped(IptrArray *array, const IptrArray *other) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
iptr *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 items_to_add = other->count;
|
|
|
|
|
for (u64 i = 0; i < items_to_add; ++i) {
|
|
|
|
|
item = wapp_iptr_array_get(other, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_iptr_array_get(other, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < items_to_add;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -3177,9 +3473,17 @@ void wapp_iptr_array_copy_capped(const IptrArray *src, IptrArray *dst) {
|
|
|
|
|
wapp_iptr_array_clear(dst);
|
|
|
|
|
|
|
|
|
|
iptr *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 to_copy = src->count < dst->capacity ? src->count : dst->capacity;
|
|
|
|
|
for (u64 i = 0; i < to_copy; ++i) {
|
|
|
|
|
item = wapp_iptr_array_get(src, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_iptr_array_get(src, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < to_copy;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -3314,9 +3618,17 @@ void wapp_uptr_array_extend_capped(UptrArray *array, const UptrArray *other) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uptr *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 items_to_add = other->count;
|
|
|
|
|
for (u64 i = 0; i < items_to_add; ++i) {
|
|
|
|
|
item = wapp_uptr_array_get(other, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_uptr_array_get(other, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < items_to_add;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@@ -3349,9 +3661,17 @@ void wapp_uptr_array_copy_capped(const UptrArray *src, UptrArray *dst) {
|
|
|
|
|
wapp_uptr_array_clear(dst);
|
|
|
|
|
|
|
|
|
|
uptr *item;
|
|
|
|
|
|
|
|
|
|
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
|
|
|
|
// MSVC Spectre mitigation warnings
|
|
|
|
|
u64 to_copy = src->count < dst->capacity ? src->count : dst->capacity;
|
|
|
|
|
for (u64 i = 0; i < to_copy; ++i) {
|
|
|
|
|
item = wapp_uptr_array_get(src, i);
|
|
|
|
|
u64 item_index = 0;
|
|
|
|
|
bool running = true;
|
|
|
|
|
while (running) {
|
|
|
|
|
item = wapp_uptr_array_get(src, item_index);
|
|
|
|
|
++item_index;
|
|
|
|
|
running = item_index < to_copy;
|
|
|
|
|
|
|
|
|
|
if (!item) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|