mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 07:08:48 +00:00
Remove TEMP_ALLOCATOR_GUARD wrapper
This commit is contained in:
@@ -119,7 +119,7 @@ clean_path :: proc(path: string, allocator: runtime.Allocator) -> (cleaned: stri
|
||||
return strings.clone(".", allocator)
|
||||
}
|
||||
|
||||
temp_allocator := get_temp_allocator(TEMP_ALLOCATOR_GUARD({ allocator }))
|
||||
temp_allocator := TEMP_ALLOCATOR_GUARD({ allocator })
|
||||
|
||||
// The extra byte is to simplify appending path elements by letting the
|
||||
// loop to end each with a separator. We'll trim the last one when we're done.
|
||||
@@ -326,7 +326,7 @@ For example, `join_path({"/home", "foo", "bar.txt"})` will result in `"/home/foo
|
||||
join_path :: proc(elems: []string, allocator: runtime.Allocator) -> (joined: string, err: Error) {
|
||||
for e, i in elems {
|
||||
if e != "" {
|
||||
temp_allocator := get_temp_allocator(TEMP_ALLOCATOR_GUARD({ allocator }))
|
||||
temp_allocator := TEMP_ALLOCATOR_GUARD({ allocator })
|
||||
p := strings.join(elems[i:], Path_Separator_String, temp_allocator) or_return
|
||||
return clean_path(p, allocator)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user