STYLE: reduced nesting on return branching

This commit is contained in:
Mark Olesen
2019-02-13 08:06:36 +01:00
committed by Andrew Heather
parent 4bc3b2b9cb
commit 60234ab007
208 changed files with 1052 additions and 1759 deletions

View File

@ -423,30 +423,26 @@ Foam::volumeType Foam::dynamicIndexedOctree<Type>::getVolumeType
// Content. Defer to shapes.
return volumeType(shapes_.getVolumeType(*this, sample));
}
else
{
// Empty node. Cannot have 'mixed' as its type since not divided
// up and has no items inside it.
FatalErrorInFunction
<< "Sample:" << sample << " node:" << nodeI
<< " with bb:" << nodes_[nodeI].bb_ << nl
<< "Empty subnode has invalid volume type MIXED."
<< abort(FatalError);
return volumeType::UNKNOWN;
}
}
else
{
// Empty node. Cannot have 'mixed' as its type since not divided
// up and has no items inside it.
FatalErrorInFunction
<< "Sample:" << sample << " at node:" << nodeI
<< " octant:" << octant
<< " with bb:" << nod.bb_.subBbox(octant) << nl
<< "Node has invalid volume type " << octantType
<< "Sample:" << sample << " node:" << nodeI
<< " with bb:" << nodes_[nodeI].bb_ << nl
<< "Empty subnode has invalid volume type MIXED."
<< abort(FatalError);
return volumeType::UNKNOWN;
}
FatalErrorInFunction
<< "Sample:" << sample << " at node:" << nodeI
<< " octant:" << octant
<< " with bb:" << nod.bb_.subBbox(octant) << nl
<< "Node has invalid volume type " << octantType
<< abort(FatalError);
return volumeType::UNKNOWN;
}