Browse Source

Fix compilation

Sasha Szpakowski 2 years ago
parent
commit
5fe40be724
2 changed files with 3 additions and 3 deletions
  1. 2 2
      src/common/runtime.cpp
  2. 1 1
      src/libraries/enet/enet.cpp

+ 2 - 2
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;
 

+ 1 - 1
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)