Remove temp parameter
This commit is contained in:
1 parent
046f72befd
commit
cf3c1a85ec
1 file changed
+1
-5
@@ -56,13 +56,9 @@ TEMP_ALLOCATOR_GUARD_END :: proc(temp: runtime.Arena_Temp, loc := #caller_locati
|
|||||||
}
|
}
|
||||||
|
|
||||||
@(deferred_out=TEMP_ALLOCATOR_GUARD_END)
|
@(deferred_out=TEMP_ALLOCATOR_GUARD_END)
|
||||||
TEMP_ALLOCATOR_GUARD :: #force_inline proc(ignore := false, loc := #caller_location) -> (runtime.Arena_Temp, runtime.Source_Code_Location) {
|
TEMP_ALLOCATOR_GUARD :: #force_inline proc(loc := #caller_location) -> (runtime.Arena_Temp, runtime.Source_Code_Location) {
|
||||||
if ignore {
|
|
||||||
return {}, loc
|
|
||||||
} else {
|
|
||||||
tmp := temp_allocator_temp_begin(loc)
|
tmp := temp_allocator_temp_begin(loc)
|
||||||
global_default_temp_allocator_index = (global_default_temp_allocator_index+1)%MAX_TEMP_ARENA_COUNT
|
global_default_temp_allocator_index = (global_default_temp_allocator_index+1)%MAX_TEMP_ARENA_COUNT
|
||||||
return tmp, loc
|
return tmp, loc
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Reference in new issue
Block a user