Allow for both odin command path -flags and odin command -flags path

To do this, if the first argument after the command and last argument is NOT a flag, then put that last parameter first.
This commit is contained in:
gingerBill
2026-06-23 17:27:17 +01:00
parent c7d313b524
commit 07fee34419
2 changed files with 39 additions and 0 deletions

View File

@@ -449,6 +449,20 @@ gb_internal void array_unordered_remove(Array<T> *array, isize index) {
array_pop(array);
}
template <typename T>
gb_internal void array_inject_at(Array<T> *array, isize index, T value) {
GB_ASSERT(0 <= index);
isize n = gb_max(array->count, index);
isize new_size = n+1;
array_resize(array, new_size);
gb_memmove(array->data+index+1, array->data+index, gb_size_of(T)*(array->count-index-1));
array->data[index] = value;
}
template <typename T>