From 5fe40be7244b8230259974e87872e56c32466175 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Mon, 26 Dec 2022 22:29:50 -0400 Subject: [PATCH] Fix compilation --- src/common/runtime.cpp | 4 ++-- src/libraries/enet/enet.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/runtime.cpp b/src/common/runtime.cpp index ddf2fa440..426e4d7d1 100644 --- a/src/common/runtime.cpp +++ b/src/common/runtime.cpp @@ -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; diff --git a/src/libraries/enet/enet.cpp b/src/libraries/enet/enet.cpp index 0daa6bae9..2e1b8ebc0 100644 --- a/src/libraries/enet/enet.cpp +++ b/src/libraries/enet/enet.cpp @@ -141,7 +141,7 @@ static uintptr_t compute_peer_key(lua_State *L, ENetPeer *peer) // pointers that 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 = std::min(ENET_ALIGNOF(ENetPeer), ENET_ALIGNOF(std::max_align_t)); + const size_t minalign = std::min(alignof(ENetPeer), alignof(std::max_align_t)); uintptr_t key = (uintptr_t) peer; if ((key & (minalign - 1)) != 0)