mirror of
https://github.com/love2d/love.git
synced 2026-08-18 11:44:15 +02:00
Fix compilation
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user