Add friendly remainders, better console experience

This commit is contained in:
Krzosa Karol
2024-08-06 18:36:58 +02:00
parent b036e48cee
commit fe20d05e13
11 changed files with 49 additions and 39 deletions

View File

@@ -490,7 +490,7 @@ void Insert(Array<T> *arr, T item, int64_t index) {
template <class T>
Array<T> Copy(Allocator alo, Array<T> array) {
Array<T> result = {alo};
result.reserve(array.cap);
Reserve(&result, array.cap);
memcpy(result.data, array.data, sizeof(T) * array.len);
result.len = array.len;
return result;