mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: reduced nesting on return branching
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
@ -27,12 +27,8 @@ License
|
||||
|
||||
#include "polyMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// Null constructor
|
||||
inline Foam::pointTopoDistanceData::pointTopoDistanceData()
|
||||
:
|
||||
data_(-1),
|
||||
@ -40,7 +36,6 @@ inline Foam::pointTopoDistanceData::pointTopoDistanceData()
|
||||
{}
|
||||
|
||||
|
||||
// Construct from components
|
||||
inline Foam::pointTopoDistanceData::pointTopoDistanceData
|
||||
(
|
||||
const label data,
|
||||
@ -126,10 +121,8 @@ inline bool Foam::pointTopoDistanceData::updatePoint
|
||||
distance_ = edgeInfo.distance_ + 1;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -149,10 +142,8 @@ inline bool Foam::pointTopoDistanceData::updatePoint
|
||||
operator=(newPointInfo);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -170,10 +161,8 @@ inline bool Foam::pointTopoDistanceData::updatePoint
|
||||
operator=(newPointInfo);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -194,10 +183,8 @@ inline bool Foam::pointTopoDistanceData::updateEdge
|
||||
operator=(pointInfo);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010, 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
@ -27,12 +27,8 @@ License
|
||||
|
||||
#include "polyMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// Null constructor
|
||||
inline Foam::topoDistanceData::topoDistanceData()
|
||||
:
|
||||
data_(-1),
|
||||
@ -40,7 +36,6 @@ inline Foam::topoDistanceData::topoDistanceData()
|
||||
{}
|
||||
|
||||
|
||||
// Construct from components
|
||||
inline Foam::topoDistanceData::topoDistanceData
|
||||
(
|
||||
const label data,
|
||||
@ -129,10 +124,8 @@ inline bool Foam::topoDistanceData::updateCell
|
||||
operator=(neighbourInfo);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -156,10 +149,8 @@ inline bool Foam::topoDistanceData::updateFace
|
||||
distance_ = neighbourInfo.distance_ + 1;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -180,10 +171,8 @@ inline bool Foam::topoDistanceData::updateFace
|
||||
operator=(neighbourInfo);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user