Inline assert condition

This commit is contained in:
gingerBill
2022-10-12 21:26:50 +01:00
parent 5ed06f7eb8
commit cf4afc2e7b

View File

@@ -44,7 +44,7 @@ arena_init_static :: proc(arena: ^Arena, reserved: uint, commit_size: uint = DEF
}
arena_alloc :: proc(arena: ^Arena, size: uint, alignment: uint, loc := #caller_location) -> (data: []byte, err: Allocator_Error) {
assert(mem.is_power_of_two(uintptr(alignment)), "non-power of two alignment", loc)
assert(alignment & (alignment-1) == 0, "non-power of two alignment", loc)
size := size
if size == 0 {