From b6838731f5073ce9f1311d64dfba8b01e7636a6a Mon Sep 17 00:00:00 2001 From: Colin Davidson Date: Wed, 17 Jan 2024 13:30:03 -0800 Subject: [PATCH] oops, indentation --- core/mem/alloc.odin | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/core/mem/alloc.odin b/core/mem/alloc.odin index af652a575..4cea20f30 100644 --- a/core/mem/alloc.odin +++ b/core/mem/alloc.odin @@ -248,11 +248,11 @@ default_resize_align :: proc(old_memory: rawptr, old_size, new_size, alignment: @(require_results) default_resize_bytes_align_non_zeroed :: proc(old_data: []byte, new_size, alignment: int, allocator := context.allocator, loc := #caller_location) -> ([]byte, Allocator_Error) { - return _default_resize_bytes_align(old_data, new_size, alignment, false, allocator, loc) + return _default_resize_bytes_align(old_data, new_size, alignment, false, allocator, loc) } @(require_results) default_resize_bytes_align :: proc(old_data: []byte, new_size, alignment: int, allocator := context.allocator, loc := #caller_location) -> ([]byte, Allocator_Error) { - return _default_resize_bytes_align(old_data, new_size, alignment, true, allocator, loc) + return _default_resize_bytes_align(old_data, new_size, alignment, true, allocator, loc) } @(require_results) @@ -260,11 +260,11 @@ _default_resize_bytes_align :: #force_inline proc(old_data: []byte, new_size, al old_memory := raw_data(old_data) old_size := len(old_data) if old_memory == nil { - if should_zero { - return alloc_bytes(new_size, alignment, allocator, loc) - } else { - return alloc_bytes_non_zeroed(new_size, alignment, allocator, loc) - } + if should_zero { + return alloc_bytes(new_size, alignment, allocator, loc) + } else { + return alloc_bytes_non_zeroed(new_size, alignment, allocator, loc) + } } if new_size == 0 { @@ -276,13 +276,13 @@ _default_resize_bytes_align :: #force_inline proc(old_data: []byte, new_size, al return old_data, .None } - new_memory : []byte - err : Allocator_Error - if should_zero { - new_memory, err = alloc_bytes(new_size, alignment, allocator, loc) - } else { - new_memory, err = alloc_bytes_non_zeroed(new_size, alignment, allocator, loc) - } + new_memory : []byte + err : Allocator_Error + if should_zero { + new_memory, err = alloc_bytes(new_size, alignment, allocator, loc) + } else { + new_memory, err = alloc_bytes_non_zeroed(new_size, alignment, allocator, loc) + } if new_memory == nil || err != nil { return nil, err }