mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Move swapptr() to pragmas. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5268 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
684da706f0
commit
f0c9019d91
2 changed files with 7 additions and 6 deletions
|
@ -128,6 +128,13 @@ static inline int32_t scale(int32_t eax, int32_t edx, int32_t ecx)
|
|||
return dw(tabledivide64(numer, ecx));
|
||||
}
|
||||
|
||||
static inline void swapptr(void *a, void *b)
|
||||
{
|
||||
intptr_t t = *(intptr_t*) a;
|
||||
*(intptr_t*) a = *(intptr_t*) b;
|
||||
*(intptr_t*) b = t;
|
||||
}
|
||||
|
||||
#if defined(__GNUC__) && defined(GEKKO)
|
||||
|
||||
// GCC Inline Assembler version (PowerPC)
|
||||
|
|
|
@ -285,12 +285,6 @@ void OSD_GetShadePal(const char *ch, int32_t *shadeptr, int32_t *palptr)
|
|||
// http://blog.frama-c.com/index.php?post/2013/08/24/Function-pointers-in-C
|
||||
// Then again, my GCC just crashed (any kept on crashing until after a reboot!)
|
||||
// when I tried to rewrite this into something different.
|
||||
static inline void swapptr(void *a, void *b)
|
||||
{
|
||||
intptr_t t = *(intptr_t*)a;
|
||||
*(intptr_t*)a = *(intptr_t*)b;
|
||||
*(intptr_t*)b = t;
|
||||
}
|
||||
|
||||
static inline void swaposdptrs(void)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue