mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-12-17 11:55:33 +00:00
Improved fallback for SDL_COMPILE_TIME_ASSERT() (thanks @icculus!)
This commit is contained in:
@@ -335,9 +335,8 @@ typedef uint64_t Uint64;
|
|||||||
#endif /* !SDL_COMPILE_TIME_ASSERT */
|
#endif /* !SDL_COMPILE_TIME_ASSERT */
|
||||||
|
|
||||||
#ifndef SDL_COMPILE_TIME_ASSERT
|
#ifndef SDL_COMPILE_TIME_ASSERT
|
||||||
/* universal, but may trigger -Wunused-local-typedefs */
|
|
||||||
#define SDL_COMPILE_TIME_ASSERT(name, x) \
|
#define SDL_COMPILE_TIME_ASSERT(name, x) \
|
||||||
typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1]
|
extern int SDL_compile_time_assert_ ## name[(x) * 2 - 1]
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** \cond */
|
/** \cond */
|
||||||
|
|||||||
Reference in New Issue
Block a user