STYLE: reduced nesting on return branching

This commit is contained in:
Mark Olesen
2019-02-13 08:06:36 +01:00
parent f3d9c8e2be
commit 6c68c4fe13
208 changed files with 1052 additions and 1759 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2016 OpenFOAM Foundation
@ -93,10 +93,8 @@ bool limitRefinementLevel
return true;
}
else
{
return false;
}
return false;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2016 OpenFOAM Foundation
@ -417,14 +417,12 @@ bool limitRefinementLevel
}
return true;
}
else
{
Info<< "Added no additional cells"
<< " to satisfy 1:" << limitDiff << " refinement level"
<< endl;
return false;
}
Info<< "Added no additional cells"
<< " to satisfy 1:" << limitDiff << " refinement level"
<< endl;
return false;
}

View File

@ -359,10 +359,8 @@ bool splitCell
return true;
}
else
{
return false;
}
return false;
}

View File

@ -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) 2012-2015 OpenFOAM Foundation
@ -149,14 +149,10 @@ bool Foam::conformalVoronoiMesh::regionIsInside
{
return meshableRegionA;
}
else
{
WarningInFunction
<< ""
<< endl;
return false;
}
WarningInFunction << endl;
return false;
}

View File

@ -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
@ -89,10 +89,8 @@ inline bool Foam::CV2D::insertMirrorPoint
insertPoint(mirrorPoint, Vb::MIRROR_POINT);
return true;
}
else
{
return false;
}
return false;
}

View File

@ -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-2015 OpenFOAM Foundation
@ -152,28 +152,14 @@ inline bool CGAL::indexedVertex<Gt, Vb>::pairPoint() const
template<class Gt, class Vb>
inline bool CGAL::indexedVertex<Gt, Vb>::ppMaster() const
{
if (type_ > index_)
{
return true;
}
else
{
return false;
}
return (type_ > index_);
}
template<class Gt, class Vb>
inline bool CGAL::indexedVertex<Gt, Vb>::ppSlave() const
{
if (type_ >= 0 && type_ < index_)
{
return true;
}
else
{
return false;
}
return (type_ >= 0 && type_ < index_);
}

View File

@ -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-2015 OpenFOAM Foundation
@ -147,10 +147,8 @@ bool Foam::CV2D::insertPointPairAtIntersection
insertPointPair(vit, interPoint, interTri, interHitSurface);
return true;
}
else
{
return false;
}
return false;
}

View File

@ -253,15 +253,14 @@ bool Foam::checkWedges
return true;
}
else
if (report)
{
if (report)
{
Info<< " All edges aligned with or perpendicular to "
<< "non-empty directions." << endl;
}
return false;
Info<< " All edges aligned with or perpendicular to "
<< "non-empty directions." << endl;
}
return false;
}
@ -468,16 +467,14 @@ bool Foam::checkCoupledPoints
return true;
}
else
{
if (report)
{
Info<< " Coupled point location match (average "
<< avgMismatch << ") OK." << endl;
}
return false;
if (report)
{
Info<< " Coupled point location match (average "
<< avgMismatch << ") OK." << endl;
}
return false;
}

View File

@ -324,10 +324,8 @@ bool isSliver
return true;
}
else
{
return false;
}
return false;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2016 OpenFOAM Foundation
@ -666,12 +666,9 @@ bool splitBorderEdges
return true;
}
else
{
Info<< "No edges to be split" <<nl << endl;
return false;
}
Info<< "No edges to be split" <<nl << endl;
return false;
}