projects
/
occt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f98441
)
0028431: Coding, Graphic3d - Eliminate GCC warning -Wstrict-overflow
author
abv
<abv@opencascade.com>
Sun, 5 Feb 2017 08:59:29 +0000
(11:59 +0300)
committer
apn
<apn@opencascade.com>
Thu, 9 Feb 2017 13:16:27 +0000
(16:16 +0300)
Code amended to avoid warning issued by GCC optimizer
src/Graphic3d/Graphic3d_ArrayOfPrimitives.lxx
patch
|
blob
|
blame
|
history
diff --git
a/src/Graphic3d/Graphic3d_ArrayOfPrimitives.lxx
b/src/Graphic3d/Graphic3d_ArrayOfPrimitives.lxx
index
6d6d1eb
..
44822a6
100644
(file)
--- a/
src/Graphic3d/Graphic3d_ArrayOfPrimitives.lxx
+++ b/
src/Graphic3d/Graphic3d_ArrayOfPrimitives.lxx
@@
-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,