Lucas Perlind 3 달 전
부모
커밋
190960e103
3개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      core/os/os2/allocators.odin
  2. 1 1
      core/os/os2/dir.odin
  3. 0 2
      core/os/os2/dir_windows.odin

+ 1 - 1
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 {

+ 1 - 1
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

+ 0 - 2
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())