Merge remote-tracking branch 'origin/master' into fix-linux-compile

This commit is contained in:
Rachael Alexanderson 2020-01-20 04:40:28 -05:00
commit bab394b061
2 changed files with 9 additions and 10 deletions

View file

@ -132,21 +132,20 @@ EDUKE32_GENERATE_PRAGMAS EDUKE32_SCALER_PRAGMA(32)
template <typename T> template <typename T>
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; T const t = *a;
*a = *b; *a = *b;
*b = t; *b = t;
} }
#define swapptr swap
#ifndef pragmas_have_swaps #ifndef pragmas_have_swaps
#define swapchar swap #define swapchar swapptr
#define swapshort swap #define swapshort swapptr
#define swaplong swap #define swaplong swapptr
#define swapfloat swap #define swapfloat swapptr
#define swapdouble swap #define swapdouble swapptr
#define swap64bit swap #define swap64bit swapptr
static FORCE_INLINE void swapchar2(void *a, void *b, int32_t s) static FORCE_INLINE void swapchar2(void *a, void *b, int32_t s)
{ {

View file

@ -5802,8 +5802,8 @@ badindex:
auto &array1 = aGameArrays[*insptr++]; auto &array1 = aGameArrays[*insptr++];
auto &array2 = aGameArrays[*insptr++]; auto &array2 = aGameArrays[*insptr++];
swap(&array1.size, &array2.size); swapptr(&array1.size, &array2.size);
swap(&array1.pValues, &array2.pValues); swapptr(&array1.pValues, &array2.pValues);
dispatch(); dispatch();
} }