mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 00:05:35 +00:00
testevdev: Add a static assertion for supported sizeof(long)
If this assertion fails on some platform (unlikely), we will need a third implementation for SwapLongLE(). Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
5b9608e08c
commit
81dee31949
|
@ -935,6 +935,7 @@ static const GuessTest guess_tests[] =
|
|||
}
|
||||
};
|
||||
|
||||
SDL_COMPILE_TIME_ASSERT(sizeof_long, sizeof(unsigned long) == 4 || sizeof(unsigned long) == 8);
|
||||
#define SwapLongLE(X) \
|
||||
((sizeof(unsigned long) == 4) ? SDL_SwapLE32(X) : SDL_SwapLE64(X))
|
||||
|
||||
|
|
Loading…
Reference in a new issue