Minor refactor of the dynamic_map_internal.odin stuff

This commit is contained in:
gingerBill
2022-09-17 14:46:52 +01:00
parent 4d512c2cf6
commit c37de9459e
2 changed files with 60 additions and 66 deletions
+2
View File
@@ -59,6 +59,8 @@ __dynamic_array_shrink :: proc(array_: rawptr, elem_size, elem_align: int, new_c
return
}
new_cap := new_cap
new_cap = max(new_cap, 0)
old_size := array.cap * elem_size
new_size := new_cap * elem_size
allocator := array.allocator