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 authored and Ryan C. Gordon committed 2025-10-25 19:52:23 -04:00
1 parent e08edab180
commit 7381a2b072
3 files changed
+9 -9

No files matched your search

+4 -4
View File
@@ -128,10 +128,10 @@ typedef struct SDL_FRect
*/
SDL_FORCE_INLINE void SDL_RectToFRect(const SDL_Rect *rect, SDL_FRect *frect)
{
frect->x = (float)rect->x;
frect->y = (float)rect->y;
frect->w = (float)rect->w;
frect->h = (float)rect->h;
frect->x = SDL_static_cast(float, rect->x);
frect->y = SDL_static_cast(float, rect->y);
frect->w = SDL_static_cast(float, rect->w);
frect->h = SDL_static_cast(float, rect->h);
}
/**