From b9251502f8dcb2a8e10149595db55b129a59360c Mon Sep 17 00:00:00 2001 From: graham Date: Fri, 1 Jul 2011 10:49:15 +0100 Subject: [PATCH] BUG: Uninitialised point. --- src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C index a35b62474b..0bd6828ed7 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C +++ b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C @@ -2520,7 +2520,7 @@ Foam::pointIndexHit Foam::indexedOctree::findNearest { scalar nearestDistSqr = startDistSqr; label nearestShapeI = -1; - point nearestPoint; + point nearestPoint = vector::zero; if (nodes_.size()) { @@ -2534,10 +2534,6 @@ Foam::pointIndexHit Foam::indexedOctree::findNearest nearestPoint ); } - else - { - nearestPoint = vector::zero; - } return pointIndexHit(nearestShapeI != -1, nearestPoint, nearestShapeI); }