summaryrefslogtreecommitdiff
path: root/src/core/endian_func.hpp
diff options
context:
space:
mode:
authorTechGeekNZ <git@tech.geek.nz>2020-07-03 09:36:10 +1200
committerNiels Martin Hansen <nielsm@indvikleren.dk>2020-07-03 09:08:46 +0200
commit716c883737b76757e0f3bcddeacc1e276dfff13b (patch)
treeafd30f0dc704eb6264499b1999a2a0f9d48d69f8 /src/core/endian_func.hpp
parent97592c409378c2d353a1cdd6b50f80b7e81b67c2 (diff)
downloadopenttd-716c883737b76757e0f3bcddeacc1e276dfff13b.tar.xz
Fix: Globally apply preprocessor directive coding style
Global; except for the 32-bit SSE blitter, which has some #DEFINEs in not-very-nice places.
Diffstat (limited to 'src/core/endian_func.hpp')
-rw-r--r--src/core/endian_func.hpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/core/endian_func.hpp b/src/core/endian_func.hpp
index b1a584785..e077d977a 100644
--- a/src/core/endian_func.hpp
+++ b/src/core/endian_func.hpp
@@ -15,27 +15,27 @@
/* Setup alignment and conversion macros */
#if TTD_ENDIAN == TTD_BIG_ENDIAN
- #define FROM_BE16(x) (x)
- #define FROM_BE32(x) (x)
- #define TO_BE16(x) (x)
- #define TO_BE32(x) (x)
- #define TO_BE32X(x) (x)
- #define FROM_LE16(x) BSWAP16(x)
- #define FROM_LE32(x) BSWAP32(x)
- #define TO_LE16(x) BSWAP16(x)
- #define TO_LE32(x) BSWAP32(x)
- #define TO_LE32X(x) BSWAP32(x)
+# define FROM_BE16(x) (x)
+# define FROM_BE32(x) (x)
+# define TO_BE16(x) (x)
+# define TO_BE32(x) (x)
+# define TO_BE32X(x) (x)
+# define FROM_LE16(x) BSWAP16(x)
+# define FROM_LE32(x) BSWAP32(x)
+# define TO_LE16(x) BSWAP16(x)
+# define TO_LE32(x) BSWAP32(x)
+# define TO_LE32X(x) BSWAP32(x)
#else
- #define FROM_BE16(x) BSWAP16(x)
- #define FROM_BE32(x) BSWAP32(x)
- #define TO_BE16(x) BSWAP16(x)
- #define TO_BE32(x) BSWAP32(x)
- #define TO_BE32X(x) BSWAP32(x)
- #define FROM_LE16(x) (x)
- #define FROM_LE32(x) (x)
- #define TO_LE16(x) (x)
- #define TO_LE32(x) (x)
- #define TO_LE32X(x) (x)
+# define FROM_BE16(x) BSWAP16(x)
+# define FROM_BE32(x) BSWAP32(x)
+# define TO_BE16(x) BSWAP16(x)
+# define TO_BE32(x) BSWAP32(x)
+# define TO_BE32X(x) BSWAP32(x)
+# define FROM_LE16(x) (x)
+# define FROM_LE32(x) (x)
+# define TO_LE16(x) (x)
+# define TO_LE32(x) (x)
+# define TO_LE32X(x) (x)
#endif /* TTD_ENDIAN == TTD_BIG_ENDIAN */
static inline uint16 ReadLE16Aligned(const void *x)