BUG: Uninitialised point.

This commit is contained in:
graham 2011-07-01 10:49:15 +01:00
parent b66b36022e
commit b9251502f8

View File

@ -2520,7 +2520,7 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findNearest
{
scalar nearestDistSqr = startDistSqr;
label nearestShapeI = -1;
point nearestPoint;
point nearestPoint = vector::zero;
if (nodes_.size())
{
@ -2534,10 +2534,6 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findNearest
nearestPoint
);
}
else
{
nearestPoint = vector::zero;
}
return pointIndexHit(nearestShapeI != -1, nearestPoint, nearestShapeI);
}