1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0028431: Coding, Graphic3d - Eliminate GCC warning -Wstrict-overflow

Code amended to avoid warning issued by GCC optimizer
This commit is contained in:
abv 2017-02-05 11:59:29 +03:00 committed by apn
parent 9f984417b1
commit f87817bc03

View File

@ -152,7 +152,10 @@ inline void Graphic3d_ArrayOfPrimitives::SetVertice (const Standard_Integer th
aVec.y() = theY;
aVec.z() = theZ;
myAttribs->NbElements = Max (theIndex, myAttribs->NbElements);
if (myAttribs->NbElements < theIndex)
{
myAttribs->NbElements = theIndex;
}
}
inline void Graphic3d_ArrayOfPrimitives::SetVertexColor (const Standard_Integer theIndex,