From ba42d1c3633d62de43a93f8e011d0a0b5d1bbe68 Mon Sep 17 00:00:00 2001 From: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com> Date: Mon, 20 Nov 2023 05:15:16 -0800 Subject: [PATCH] Update types.h Don't redefine swap16 if already defined --- src/types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/types.h b/src/types.h index 0c024ae..5238661 100644 --- a/src/types.h +++ b/src/types.h @@ -69,7 +69,9 @@ static FORCEINLINE uint UintMax(uint a, uint b) { return a > b ? a : b; } #define DWORD(x) (*(uint32*)&(x)) #define XY(x, y) ((y)*64+(x)) +#ifndef swap16 static inline uint16 swap16(uint16 v) { return (v << 8) | (v >> 8); } +#endif void NORETURN Die(const char *error); void Warning(const char *error);