diff options
Diffstat (limited to 'core/container/small_array/small_array.odin')
| -rw-r--r-- | core/container/small_array/small_array.odin | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/container/small_array/small_array.odin b/core/container/small_array/small_array.odin index 31cc8315e..23d5ad6b7 100644 --- a/core/container/small_array/small_array.odin +++ b/core/container/small_array/small_array.odin @@ -1,8 +1,8 @@ package container_small_array import "base:builtin" +@require import "base:intrinsics" @require import "base:runtime" -@require import "core:mem" /* A fixed-size stack-allocated array operated on in a dynamic fashion. @@ -285,11 +285,11 @@ Output: [1] [1, 2, 0, 0, 0] */ -resize :: proc "contextless" (a: ^$A/Small_Array, length: int) { +resize :: proc "contextless" (a: ^$A/Small_Array($N, $T), length: int) { prev_len := a.len a.len = min(length, builtin.len(a.data)) if prev_len < a.len { - mem.zero_slice(a.data[prev_len:a.len]) + intrinsics.mem_zero(&a.data[prev_len], size_of(T)*(a.len-prev_len)) } } |