diff --git a/source/build/include/pragmas.h b/source/build/include/pragmas.h index 922917289..1c143c99e 100644 --- a/source/build/include/pragmas.h +++ b/source/build/include/pragmas.h @@ -132,21 +132,20 @@ EDUKE32_GENERATE_PRAGMAS EDUKE32_SCALER_PRAGMA(32) template -static FORCE_INLINE void swap(T * const a, T * const b) +static FORCE_INLINE void swapptr(T * const a, T * const b) { T const t = *a; *a = *b; *b = t; } -#define swapptr swap #ifndef pragmas_have_swaps -#define swapchar swap -#define swapshort swap -#define swaplong swap -#define swapfloat swap -#define swapdouble swap -#define swap64bit swap +#define swapchar swapptr +#define swapshort swapptr +#define swaplong swapptr +#define swapfloat swapptr +#define swapdouble swapptr +#define swap64bit swapptr static FORCE_INLINE void swapchar2(void *a, void *b, int32_t s) { diff --git a/source/duke3d/src/gameexec.cpp b/source/duke3d/src/gameexec.cpp index 22273e3d9..70ee7f35c 100644 --- a/source/duke3d/src/gameexec.cpp +++ b/source/duke3d/src/gameexec.cpp @@ -5802,8 +5802,8 @@ badindex: auto &array1 = aGameArrays[*insptr++]; auto &array2 = aGameArrays[*insptr++]; - swap(&array1.size, &array2.size); - swap(&array1.pValues, &array2.pValues); + swapptr(&array1.size, &array2.size); + swapptr(&array1.pValues, &array2.pValues); dispatch(); }