mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-16 14:29:05 -07:00
sci-mathematics/mathmod: fix comparison for clang
Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr> Part-of: https://codeberg.org/gentoo/gentoo/pulls/1855 Merges: https://codeberg.org/gentoo/gentoo/pulls/1855 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Sam James
parent
0f8163ae55
commit
47c4a33abe
@@ -0,0 +1,24 @@
|
||||
backport https://github.com/parisolab/mathmod/commit/ddf9239f10fb0e07603297c06a23b7adeae8e323.patch
|
||||
see also https://github.com/parisolab/mathmod/issues/303
|
||||
fix comparison for clang
|
||||
--- a/ui_modules/mathmod.cpp
|
||||
+++ b/ui_modules/mathmod.cpp
|
||||
@@ -1665,7 +1665,7 @@ void MathMod::CopyData(ObjectProperties *scene)
|
||||
{
|
||||
glBindBuffer(GL_ARRAY_BUFFER, vbo[0]);
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vbo[1]);
|
||||
- if(scene->VertxNumber>previousVertxNumber>0)
|
||||
+ if((scene->VertxNumber>previousVertxNumber) && (scene->VertxNumber>0))
|
||||
{
|
||||
glBufferData(GL_ARRAY_BUFFER, sizeof(GL_FLOAT)*10*(scene->VertxNumber+(12+60+36)), scene->ArrayNorVer_localPt, GL_STATIC_DRAW);
|
||||
previousVertxNumber = scene->VertxNumber;
|
||||
@@ -1676,7 +1676,8 @@ void MathMod::CopyData(ObjectProperties *scene)
|
||||
previousVertxNumber = scene->VertxNumber;
|
||||
}
|
||||
|
||||
- if((scene->PolyNumber + scene->NbPolygnNbVertexPtMinSize)>previousPolyNumberNbPolygnNbVertexPtMin)
|
||||
+ if(((scene->PolyNumber + scene->NbPolygnNbVertexPtMinSize)>previousPolyNumberNbPolygnNbVertexPtMin) &&
|
||||
+ ((scene->PolyNumber + scene->NbPolygnNbVertexPtMinSize)>0))
|
||||
{
|
||||
glBufferData(GL_ELEMENT_ARRAY_BUFFER,sizeof(GLuint)*(scene->PolyNumber + scene->NbPolygnNbVertexPtMinSize), scene->PolyIndices_localPt, GL_STATIC_DRAW);
|
||||
previousPolyNumberNbPolygnNbVertexPtMin = (scene->PolyNumber + scene->NbPolygnNbVertexPtMinSize);
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@@ -22,9 +22,10 @@ RDEPEND="
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
PATCHES=(
|
||||
# both merged
|
||||
# all in master
|
||||
"${FILESDIR}"/${PN}-13.0-missing_include.patch
|
||||
"${FILESDIR}"/${PN}-13.0-fix_cxx20.patch
|
||||
"${FILESDIR}"/${PN}-13.0-fix_comparison.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
|
||||
Reference in New Issue
Block a user