Commit c5917828 authored by Sean McBride's avatar Sean McBride

Fixed dead store warning by reformulating loop

Switched while to do-while to fix warning about initial 'rayMag' setting
being dead.

Change-Id: I3944988ec87f9c9b51aa1b19a1ee3aaa2ad85b47
parent 8f0a469e
......@@ -1878,8 +1878,7 @@ int vtkPolyhedron::IsInside(double x[3], double tolerance)
iterNumber++)
{
// Define a random ray to fire.
rayMag = 0.0;
while (rayMag == 0.0 )
do
{
for (i=0; i<3; i++)
{
......@@ -1887,6 +1886,7 @@ int vtkPolyhedron::IsInside(double x[3], double tolerance)
}
rayMag = vtkMath::Norm(ray);
}
while (rayMag == 0.0);
// The ray must be appropriately sized wrt the bounding box. (It has to go
// all the way through the bounding box.)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment