mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00:00
Chnage next_pow2 to ceil_to_pow2
This commit is contained in:
@@ -233,7 +233,7 @@ __dynamic_map_reserve :: proc(using header: Map_Header, cap: int, loc := #caller
|
|||||||
context = c
|
context = c
|
||||||
|
|
||||||
cap := cap
|
cap := cap
|
||||||
cap = next_pow2(cap)
|
cap = ceil_to_pow2(cap)
|
||||||
|
|
||||||
__dynamic_array_reserve(&m.entries, entry_size, entry_align, cap, loc)
|
__dynamic_array_reserve(&m.entries, entry_size, entry_align, cap, loc)
|
||||||
|
|
||||||
@@ -309,7 +309,7 @@ __dynamic_map_set :: proc(h: Map_Header, hash: Map_Hash, value: rawptr, loc := #
|
|||||||
|
|
||||||
|
|
||||||
@(private="file")
|
@(private="file")
|
||||||
next_pow2 :: proc "contextless" (n: int) -> int {
|
ceil_to_pow2 :: proc "contextless" (n: int) -> int {
|
||||||
n := n
|
n := n
|
||||||
if n <= 0 {
|
if n <= 0 {
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
Reference in New Issue
Block a user