You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/games-roguelike/scourge/files/scourge-0.21.1-Wc++11-narro...

19 lines
570 B

Allow compiling with Clang
https://bugs.gentoo.org/739330
--- a/src/sdlhandler.cpp
+++ b/src/sdlhandler.cpp
@@ -1034,10 +1034,10 @@
bool SDLHandler::intersects( int x, int y, int w, int h,
int x2, int y2, int w2, int h2 ) {
SDL_Rect ra = {
- x, y, w, h
+ static_cast<Sint16>(x), static_cast<Sint16>(y), static_cast<Uint16>(w), static_cast<Uint16>(h)
};
SDL_Rect rb = {
- x2, y2, w2, h2
+ static_cast<Sint16>(x2), static_cast<Sint16>(y2), static_cast<Uint16>(w2), static_cast<Uint16>(h2)
};
return intersects( &ra, &rb );
}