Fix: map key not getting transferred on rehash

This commit is contained in:
Ginger Bill
2017-04-11 23:11:05 +01:00
parent 8e73d1ce1f
commit 627ee002e8
2 changed files with 4 additions and 8 deletions
+1 -4
View File
@@ -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));
}