mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-20 08:26:47 +00:00
Fix: map key not getting transferred on rehash
This commit is contained in:
+1
-4
@@ -3622,14 +3622,11 @@ b32 gb_is_power_of_two(isize x) {
|
||||
|
||||
gb_inline void *gb_align_forward(void *ptr, isize alignment) {
|
||||
uintptr p;
|
||||
isize modulo;
|
||||
|
||||
GB_ASSERT(gb_is_power_of_two(alignment));
|
||||
|
||||
p = cast(uintptr)ptr;
|
||||
modulo = p & (alignment-1);
|
||||
if (modulo) p += (alignment - modulo);
|
||||
return cast(void *)p;
|
||||
return cast(void *)((p + (alignment-1)) &~ (alignment-1));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user