Use cast operators in headers to avoid warnings

This avoids compiler warnings when consuming the
headers from C++.
This commit is contained in:
Albin Johansson
2025-10-26 00:46:29 +02:00
committed by Ryan C. Gordon
parent e08edab180
commit 7381a2b072
3 changed files with 9 additions and 9 deletions

View File

@@ -1069,7 +1069,7 @@ typedef union SDL_Event
} SDL_Event;
/* Make sure we haven't broken binary compatibility */
SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == sizeof(((SDL_Event *)NULL)->padding));
SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == sizeof((SDL_static_cast(SDL_Event *, NULL))->padding));
/* Function prototypes */