mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-12-14 02:34:32 +08:00
Use cast operators in headers to avoid warnings
This avoids compiler warnings when consuming the
headers from C++.
(cherry picked from commit 7381a2b072)
This commit is contained in:
committed by
Sam Lantinga
parent
95977f41b7
commit
16d9f7316f
@@ -125,10 +125,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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user