summaryrefslogtreecommitdiff
path: root/games-roguelike/scourge/files/scourge-0.21.1-Wc++11-narrowing.patch
diff options
context:
space:
mode:
Diffstat (limited to 'games-roguelike/scourge/files/scourge-0.21.1-Wc++11-narrowing.patch')
-rw-r--r--games-roguelike/scourge/files/scourge-0.21.1-Wc++11-narrowing.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/games-roguelike/scourge/files/scourge-0.21.1-Wc++11-narrowing.patch b/games-roguelike/scourge/files/scourge-0.21.1-Wc++11-narrowing.patch
new file mode 100644
index 000000000000..a852248c9fc2
--- /dev/null
+++ b/games-roguelike/scourge/files/scourge-0.21.1-Wc++11-narrowing.patch
@@ -0,0 +1,18 @@
+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 );
+ }