games-puzzle/brainparty: tweak for clang-11

Reported-by: Agostino Sarubbo
Closes: https://bugs.gentoo.org/739284
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
This commit is contained in:
Sergei Trofimovich
2021-02-11 08:55:41 +00:00
parent fdb3061a9f
commit f34612bd02
2 changed files with 15 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ PATCHES=(
"${FILESDIR}"/${P}-gcc49.patch
"${FILESDIR}"/${P}-gnu_cxx-hash.patch
"${FILESDIR}"/${P}-gcc-11.patch
"${FILESDIR}"/${P}-clang-11.patch
)
src_prepare() {

View File

@@ -0,0 +1,14 @@
clang-11 needs explicit cast
https://bugs.gentoo.org/739284
--- a/BPGame.cpp
+++ b/BPGame.cpp
@@ -1507,7 +1507,7 @@ int BPGame::DivRem(int Num, int Div, int* Rem) {
}
void BPGame::DrawLine(int fromx, int fromy, int tox, int toy, Colour* col, float width) {
- GLfloat vertices[] = { fromx, fromy, tox, toy };
+ GLfloat vertices[] = { (GLfloat)fromx, (GLfloat)fromy, (GLfloat)tox, (GLfloat)toy };
glDisable(GL_TEXTURE_2D);
glLineWidth(width);