Inline assert condition
This commit is contained in:
1 parent
5ed06f7eb8
commit
cf4afc2e7b
1 file changed
+1
-1
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user