Clean-up and unification for the allocation procedures

This commit is contained in:
gingerBill
2022-08-08 12:23:19 +01:00
parent 4aca9372a6
commit c97a8418dc
4 changed files with 38 additions and 71 deletions
+1 -1
View File
@@ -197,7 +197,7 @@ __slice_resize :: proc(array_: ^$T/[]$E, new_count: int, allocator: Allocator, l
if err != nil {
return false
}
if new_data != nil || elem_size == 0 {
if new_data != nil || size_of(E) == 0 {
array.data = raw_data(new_data)
array.len = new_count
return true