summaryrefslogtreecommitdiff
path: root/games-roguelike/scourge/files/scourge-0.21.1-Wc++11-narrowing.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
commit40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch)
tree758c221bad35c9288d0bd6df9c7dfc226728e52c /games-roguelike/scourge/files/scourge-0.21.1-Wc++11-narrowing.patch
parent8d5dbd847cbc704a6a06405856e94b461011afe3 (diff)
gentoo resync : 28.04.2021
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 );
+ }