From 4ff0221a8da43374fd5f2da4afd92a909b9b9901 Mon Sep 17 00:00:00 2001 From: Vladimir Olteanu Date: Tue, 11 May 2021 01:12:13 +0300 Subject: [PATCH] Fix https://github.com/diasurgical/devilutionX/issues/1928 --- Source/engine.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Source/engine.h b/Source/engine.h index 24fe64134..beb1d4ade 100644 --- a/Source/engine.h +++ b/Source/engine.h @@ -159,11 +159,7 @@ constexpr uint32_t LoadLE32(const T *b) { static_assert(sizeof(T) == 1, "invalid argument"); -#if BYTE_ORDER == LITTLE_ENDIAN return ((uint32_t)(b)[3] << 24) | ((uint32_t)(b)[2] << 16) | ((uint32_t)(b)[1] << 8) | (uint32_t)(b)[0]; -#else /* BIG ENDIAN */ - return ((uint32_t)(b)[0] << 24) | ((uint32_t)(b)[1] << 16) | ((uint32_t)(b)[2] << 8) | (uint32_t)(b)[3]; -#endif } template @@ -171,11 +167,7 @@ constexpr uint32_t LoadBE32(const T *b) { static_assert(sizeof(T) == 1, "invalid argument"); -#if BYTE_ORDER == LITTLE_ENDIAN return ((uint32_t)(b)[0] << 24) | ((uint32_t)(b)[1] << 16) | ((uint32_t)(b)[2] << 8) | (uint32_t)(b)[3]; -#else /* BIG ENDIAN */ - return ((uint32_t)(b)[3] << 24) | ((uint32_t)(b)[2] << 16) | ((uint32_t)(b)[1] << 8) | (uint32_t)(b)[0]; -#endif } inline byte *CelGetFrame(byte *pCelBuff, int nCel, int *nDataSize)