Ver Fonte

Improved fallback for SDL_COMPILE_TIME_ASSERT() (thanks @icculus!)

Sam Lantinga há 1 ano atrás
pai
commit
9d453daa23
1 ficheiros alterados com 1 adições e 2 exclusões
  1. 1 2
      include/SDL3/SDL_stdinc.h

+ 1 - 2
include/SDL3/SDL_stdinc.h

@@ -335,9 +335,8 @@ typedef uint64_t Uint64;
 #endif /* !SDL_COMPILE_TIME_ASSERT */
 
 #ifndef SDL_COMPILE_TIME_ASSERT
-/* universal, but may trigger -Wunused-local-typedefs */
 #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
 
 /** \cond */