mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
renamed the swap function in pragmas.h
This conflicts with std::swap on some setups.
This commit is contained in:
parent
ef3ade08d3
commit
e555d15cc7
2 changed files with 9 additions and 10 deletions
|
@ -132,21 +132,20 @@ EDUKE32_GENERATE_PRAGMAS EDUKE32_SCALER_PRAGMA(32)
|
|||
|
||||
|
||||
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;
|
||||
*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)
|
||||
{
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue