mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-17 16:38:22 +00:00
mem: Remove pointless check in Scratch_Allocator
The backup allocator is set at `init` which happens even if `Scratch` is nil at the head of `scratch_alloc_bytes_non_zeroed`.
This commit is contained in:
@@ -545,9 +545,6 @@ scratch_alloc_bytes_non_zeroed :: proc(
|
||||
if err != nil {
|
||||
return ptr, err
|
||||
}
|
||||
if s.leaked_allocations == nil {
|
||||
s.leaked_allocations, err = make([dynamic][]byte, a)
|
||||
}
|
||||
append(&s.leaked_allocations, ptr)
|
||||
if logger := context.logger; logger.lowest_level <= .Warning {
|
||||
if logger.procedure != nil {
|
||||
|
||||
Reference in New Issue
Block a user