Fix compilation

This commit is contained in:
Sasha Szpakowski
2022-12-26 22:29:50 -04:00
parent 7137c3ffb7
commit 5fe40be724
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -129,7 +129,7 @@ static ObjectKey luax_computeloveobjectkey(lua_State *L, love::Object *object)
// use more than 53 bits if their alignment is guaranteed to be more than 1.
// For example an alignment requirement of 8 means we can shift the
// pointer's bits by 3.
const size_t minalign = LOVE_ALIGNOF(std::max_align_t);
const size_t minalign = alignof(std::max_align_t);
uintptr_t key = (uintptr_t) object;
if ((key & (minalign - 1)) != 0)
@@ -138,7 +138,7 @@ static ObjectKey luax_computeloveobjectkey(lua_State *L, love::Object *object)
"(pointer is %p but alignment should be %d)", object, minalign);
}
static const size_t shift = (size_t) log2(LOVE_ALIGNOF(std::max_align_t));
static const size_t shift = (size_t) log2(alignof(std::max_align_t));
key >>= shift;