Skip to content
Snippets Groups Projects
Commit 3aaac4d6 authored by Aron Helser's avatar Aron Helser
Browse files

vtkTetra - fix compile warning on linux, style issue

Fix an 'array index out-of-bounds' warning on linux.
Add some braces for code-style.
parent c75cf50b
No related branches found
No related tags found
No related merge requests found
......@@ -920,12 +920,18 @@ void vtkTetra::Clip(double value, vtkDataArray *cellScalars,
for (i=0; i<(edge[0]-1); i++)
{
assert(i < 6 && "The point index is out-of-range.");
for (allDifferent=1, j=i+1; j<edge[0] && allDifferent; j++)
for (allDifferent=1, j=i+1; j<edge[0] && allDifferent && j<6; j++)
{
assert(j < 6 && "The point index is out-of-range.");
if (pts[i] == pts[j]) allDifferent = 0;
if (pts[i] == pts[j])
{
allDifferent = 0;
}
}
if (allDifferent)
{
numUnique++;
}
if (allDifferent) numUnique++;
}
if ( edge[0] == 4 && numUnique == 4 ) // check for degenerate tetra
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment