aboutsummaryrefslogtreecommitdiff
path: root/core/os
diff options
context:
space:
mode:
authorLucas Perlind <perlindluca@gmail.com>2025-04-30 19:56:52 +1000
committerLucas Perlind <perlindluca@gmail.com>2025-05-08 17:41:03 +1000
commit190960e103585fad1b7e833e08ea6d3a99584830 (patch)
tree93fff4a58146cc8ab53b002763efe0b7b0b1ae22 /core/os
parentb9db1dd3e0b2b53f344e7572f88719586bd4ab83 (diff)
fix -vet
Diffstat (limited to 'core/os')
-rw-r--r--core/os/os2/allocators.odin2
-rw-r--r--core/os/os2/dir.odin2
-rw-r--r--core/os/os2/dir_windows.odin2
3 files changed, 2 insertions, 4 deletions
diff --git a/core/os/os2/allocators.odin b/core/os/os2/allocators.odin
index 1a02d4514..5481c4c61 100644
--- a/core/os/os2/allocators.odin
+++ b/core/os/os2/allocators.odin
@@ -52,7 +52,7 @@ TEMP_ALLOCATOR_GUARD :: #force_inline proc(collisions: []runtime.Allocator, loc
Temp_Allocator :: struct {
using arena: ^runtime.Arena,
- using allocator: runtime.Allocator
+ using allocator: runtime.Allocator,
}
get_temp_allocator :: proc(tmp: runtime.Arena_Temp, _: runtime.Source_Code_Location) -> Temp_Allocator {
diff --git a/core/os/os2/dir.odin b/core/os/os2/dir.odin
index a20c1b346..7e0dfe97e 100644
--- a/core/os/os2/dir.odin
+++ b/core/os/os2/dir.odin
@@ -206,7 +206,7 @@ copy_directory :: proc(dst, src: string, dst_perm := 0o755) -> Error {
file_infos := read_all_directory_by_path(src, temp_allocator) or_return
for fi in file_infos {
- temp_allocator := get_temp_allocator(TEMP_ALLOCATOR_GUARD({}))
+ temp_allocator_scope(temp_allocator)
dst_path := join_path({dst, fi.name}, temp_allocator) or_return
src_path := fi.fullpath
diff --git a/core/os/os2/dir_windows.odin b/core/os/os2/dir_windows.odin
index 722f49717..daabbaf67 100644
--- a/core/os/os2/dir_windows.odin
+++ b/core/os/os2/dir_windows.odin
@@ -51,8 +51,6 @@ Read_Directory_Iterator_Impl :: struct {
@(require_results)
_read_directory_iterator :: proc(it: ^Read_Directory_Iterator) -> (fi: File_Info, index: int, ok: bool) {
- temp_allocator := get_temp_allocator(TEMP_ALLOCATOR_GUARD({}))
-
for !it.impl.no_more_files {
err: Error
file_info_delete(it.impl.prev_fi, file_allocator())