From cf3c1a85ec601f6814460bd2317dcdf91f7c7665 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 4 Aug 2024 17:36:28 +0100 Subject: [PATCH] Remove `temp` parameter --- core/os/os2/allocators.odin | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/core/os/os2/allocators.odin b/core/os/os2/allocators.odin index 47f12b540..ef73809b1 100644 --- a/core/os/os2/allocators.odin +++ b/core/os/os2/allocators.odin @@ -56,13 +56,9 @@ TEMP_ALLOCATOR_GUARD_END :: proc(temp: runtime.Arena_Temp, loc := #caller_locati } @(deferred_out=TEMP_ALLOCATOR_GUARD_END) -TEMP_ALLOCATOR_GUARD :: #force_inline proc(ignore := false, loc := #caller_location) -> (runtime.Arena_Temp, runtime.Source_Code_Location) { - if ignore { - return {}, loc - } else { - tmp := temp_allocator_temp_begin(loc) - global_default_temp_allocator_index = (global_default_temp_allocator_index+1)%MAX_TEMP_ARENA_COUNT - return tmp, loc - } +TEMP_ALLOCATOR_GUARD :: #force_inline proc(loc := #caller_location) -> (runtime.Arena_Temp, runtime.Source_Code_Location) { + tmp := temp_allocator_temp_begin(loc) + global_default_temp_allocator_index = (global_default_temp_allocator_index+1)%MAX_TEMP_ARENA_COUNT + return tmp, loc }