Chnage next_pow2 to ceil_to_pow2

This commit is contained in:
gingerBill
2022-09-17 11:18:26 +01:00
committed by GitHub
parent 0ff5ff6ff2
commit a903e5024c
+2 -2
View File
@@ -233,7 +233,7 @@ __dynamic_map_reserve :: proc(using header: Map_Header, cap: int, loc := #caller
context = c
cap := cap
cap = next_pow2(cap)
cap = ceil_to_pow2(cap)
__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")
next_pow2 :: proc "contextless" (n: int) -> int {
ceil_to_pow2 :: proc "contextless" (n: int) -> int {
n := n
if n <= 0 {
return 0