aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2025-10-28 00:40:07 +0100
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2026-02-08 12:42:26 +0100
commitf63c2094784849ab1ebe1688558e90410af83152 (patch)
treed92d1dc0bce5c0753340535f5349c3c6b8731cff /core
parent1cbd60f40e974eead2b46bc5fdd732c6357dfdfb (diff)
Convert `core:encoding/hxa`
Diffstat (limited to 'core')
-rw-r--r--core/encoding/hxa/read.odin8
-rw-r--r--core/encoding/hxa/write.odin6
2 files changed, 7 insertions, 7 deletions
diff --git a/core/encoding/hxa/read.odin b/core/encoding/hxa/read.odin
index 6dde16848..04dcab817 100644
--- a/core/encoding/hxa/read.odin
+++ b/core/encoding/hxa/read.odin
@@ -1,7 +1,7 @@
package encoding_hxa
import "core:fmt"
-import "core:os"
+import os "core:os/os2"
import "core:mem"
Read_Error :: enum {
@@ -14,13 +14,13 @@ Read_Error :: enum {
read_from_file :: proc(filename: string, print_error := false, allocator := context.allocator, loc := #caller_location) -> (file: File, err: Read_Error) {
context.allocator = allocator
- data, ok := os.read_entire_file(filename, allocator, loc)
- if !ok {
+ data, data_err := os.read_entire_file(filename, allocator)
+ if data_err != nil {
err = .Unable_To_Read_File
delete(data, allocator, loc)
return
}
- file, err = read(data, filename, print_error, allocator, loc)
+ file, err = read(data, filename, print_error, allocator)
file.backing = data
return
}
diff --git a/core/encoding/hxa/write.odin b/core/encoding/hxa/write.odin
index 5bb950e81..e8ef9a139 100644
--- a/core/encoding/hxa/write.odin
+++ b/core/encoding/hxa/write.odin
@@ -1,7 +1,7 @@
package encoding_hxa
-import "core:os"
-import "core:mem"
+import os "core:os/os2"
+import "core:mem"
Write_Error :: enum {
None,
@@ -18,7 +18,7 @@ write_to_file :: proc(filepath: string, file: File) -> (err: Write_Error) {
defer delete(buf)
write_internal(&Writer{data = buf}, file)
- if !os.write_entire_file(filepath, buf) {
+ if os.write_entire_file(filepath, buf) != nil {
err =.Failed_File_Write
}
return