forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
games-roguelike/scourge: Port to EAPI 7
* Fix building against Clang Closes: https://bugs.gentoo.org/739330 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: David Seifert <[email protected]>
- Loading branch information
1 parent
0eae9ea
commit f8ca5ce
Showing
2 changed files
with
35 additions
and
15 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
games-roguelike/scourge/files/scourge-0.21.1-Wc++11-narrowing.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters