diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2026-02-12 18:19:24 +0100 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2026-02-12 18:19:24 +0100 |
| commit | c0300a33039ab003cbf105c082fe43de4b17ab96 (patch) | |
| tree | b2a725d684c4da52757591c864828554a919db8d /core/encoding/hxa/write.odin | |
| parent | 8cb22d9685c6fb59784514b36e91991ca759b847 (diff) | |
Remove `core:mem` imports from `core:encoding`.
Diffstat (limited to 'core/encoding/hxa/write.odin')
| -rw-r--r-- | core/encoding/hxa/write.odin | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/core/encoding/hxa/write.odin b/core/encoding/hxa/write.odin index cbf9c7cb6..0716131f5 100644 --- a/core/encoding/hxa/write.odin +++ b/core/encoding/hxa/write.odin @@ -1,7 +1,5 @@ package encoding_hxa -import "core:mem" - Write_Error :: enum { None, Buffer_Too_Small, @@ -50,7 +48,7 @@ write_internal :: proc(w: ^Writer, file: File) { remaining := len(w.data) - w.offset assert(size_of(T)*len(array) <= remaining) ptr := raw_data(w.data[w.offset:]) - dst := mem.slice_ptr((^T)(ptr), len(array)) + dst := ([^]T)(ptr)[:len(array)] copy(dst, array) } w.offset += size_of(T)*len(array) @@ -60,7 +58,7 @@ write_internal :: proc(w: ^Writer, file: File) { remaining := len(w.data) - w.offset assert(size_of(byte)*len(str) <= remaining) ptr := raw_data(w.data[w.offset:]) - dst := mem.slice_ptr((^byte)(ptr), len(str)) + dst := ([^]byte)(ptr)[:len(str)] copy(dst, str) } w.offset += size_of(byte)*len(str) |