mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
oops, indentation
This commit is contained in:
+14
-14
@@ -248,11 +248,11 @@ default_resize_align :: proc(old_memory: rawptr, old_size, new_size, alignment:
|
|||||||
|
|
||||||
@(require_results)
|
@(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) {
|
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)
|
@(require_results)
|
||||||
default_resize_bytes_align :: proc(old_data: []byte, new_size, alignment: int, allocator := context.allocator, loc := #caller_location) -> ([]byte, Allocator_Error) {
|
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)
|
@(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_memory := raw_data(old_data)
|
||||||
old_size := len(old_data)
|
old_size := len(old_data)
|
||||||
if old_memory == nil {
|
if old_memory == nil {
|
||||||
if should_zero {
|
if should_zero {
|
||||||
return alloc_bytes(new_size, alignment, allocator, loc)
|
return alloc_bytes(new_size, alignment, allocator, loc)
|
||||||
} else {
|
} else {
|
||||||
return alloc_bytes_non_zeroed(new_size, alignment, allocator, loc)
|
return alloc_bytes_non_zeroed(new_size, alignment, allocator, loc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if new_size == 0 {
|
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
|
return old_data, .None
|
||||||
}
|
}
|
||||||
|
|
||||||
new_memory : []byte
|
new_memory : []byte
|
||||||
err : Allocator_Error
|
err : Allocator_Error
|
||||||
if should_zero {
|
if should_zero {
|
||||||
new_memory, err = alloc_bytes(new_size, alignment, allocator, loc)
|
new_memory, err = alloc_bytes(new_size, alignment, allocator, loc)
|
||||||
} else {
|
} else {
|
||||||
new_memory, err = alloc_bytes_non_zeroed(new_size, alignment, allocator, loc)
|
new_memory, err = alloc_bytes_non_zeroed(new_size, alignment, allocator, loc)
|
||||||
}
|
}
|
||||||
if new_memory == nil || err != nil {
|
if new_memory == nil || err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user