Commit b04eaeed authored by Sam Lantinga's avatar Sam Lantinga

Fixed compiler warnings using Windows intrinsics

parent cdb1bda3
...@@ -115,10 +115,10 @@ extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock); ...@@ -115,10 +115,10 @@ extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
#if defined(__WIN32__) #if defined(__WIN32__)
#include <intrin.h> #include <intrin.h>
#define SDL_AtomicSet(a, v) _InterlockedExchange(&(a)->value, (v)) #define SDL_AtomicSet(a, v) _InterlockedExchange((long*)&(a)->value, (v))
#define SDL_AtomicGet(a) ((a)->value) #define SDL_AtomicGet(a) ((a)->value)
#define SDL_AtomicAdd(a, v) _InterlockedExchangeAdd(&(a)->value, (v)) #define SDL_AtomicAdd(a, v) _InterlockedExchangeAdd((long*)&(a)->value, (v))
#define SDL_AtomicCAS(a, oldval, newval) (_InterlockedCompareExchange(&(a)->value, (newval), (oldval)) == (oldval)) #define SDL_AtomicCAS(a, oldval, newval) (_InterlockedCompareExchange((long*)&(a)->value, (newval), (oldval)) == (oldval))
#define SDL_AtomicSetPtr(a, v) (void)_InterlockedExchangePointer((a), (v)) #define SDL_AtomicSetPtr(a, v) (void)_InterlockedExchangePointer((a), (v))
#define SDL_AtomicGetPtr(a) (*(a)) #define SDL_AtomicGetPtr(a) (*(a))
#if _M_IX86 #if _M_IX86
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment