skip definition of inline swap16() function in case a macro already exists (#175)

Fixes the build on OpenBSD.
This commit is contained in:
Stefan Sperling
2023-03-05 23:09:00 +01:00
committed by GitHub
parent afc7f9b313
commit d3ab969a0b

View File

@@ -63,7 +63,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
typedef struct Point16U {
uint16 x, y;