STYLE: consistent lookupOrDefault template parameters

- in many cases can just use lookupOrDefault("key", bool) instead of
  lookupOrDefault<bool> or lookupOrDefault<Switch> since reading a
  bool from an Istream uses the Switch(Istream&) anyhow

STYLE: relocated Switch string names into file-local scope
This commit is contained in:
Mark Olesen
2018-03-26 09:09:09 +02:00
parent 568fbf727d
commit 36719bf55b
75 changed files with 161 additions and 163 deletions

View File

@ -538,7 +538,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
)
)
),
AMIReverse_(dict.lookupOrDefault<bool>("flipNormals", false)),
AMIReverse_(dict.lookupOrDefault("flipNormals", false)),
AMIRequireMatch_(true),
AMILowWeightCorrection_(dict.lookupOrDefault("lowWeightCorrection", -1.0)),
surfPtr_(nullptr),

View File

@ -1037,7 +1037,7 @@ Foam::mappedPatchBase::mappedPatchBase
sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()),
mapPtr_(nullptr),
AMIPtr_(nullptr),
AMIReverse_(dict.lookupOrDefault<bool>("flipNormals", false)),
AMIReverse_(dict.lookupOrDefault("flipNormals", false)),
surfPtr_(nullptr),
surfDict_(dict.subOrEmptyDict("surface"))
{
@ -1119,7 +1119,7 @@ Foam::mappedPatchBase::mappedPatchBase
sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()),
mapPtr_(nullptr),
AMIPtr_(nullptr),
AMIReverse_(dict.lookupOrDefault<bool>("flipNormals", false)),
AMIReverse_(dict.lookupOrDefault("flipNormals", false)),
surfPtr_(nullptr),
surfDict_(dict.subOrEmptyDict("surface"))
{

View File

@ -151,7 +151,7 @@ Foam::regionCoupledBase::regionCoupledBase
nbrRegionName_(dict.lookup("neighbourRegion")),
sameRegion_(nbrRegionName_ == patch_.boundaryMesh().mesh().name()),
AMIPtr_(nullptr),
AMIReverse_(dict.lookupOrDefault<bool>("flipNormals", false)),
AMIReverse_(dict.lookupOrDefault("flipNormals", false)),
surfPtr_(nullptr),
surfDict_(dict.subOrEmptyDict("surface"))
{}

View File

@ -431,7 +431,7 @@ Foam::surfaceToCell::surfaceToCell
includeOutside_(readBool(dict.lookup("includeOutside"))),
useSurfaceOrientation_
(
dict.lookupOrDefault<bool>("useSurfaceOrientation", false)
dict.lookupOrDefault("useSurfaceOrientation", false)
),
nearDist_(readScalar(dict.lookup("nearDistance"))),
curvature_(readScalar(dict.lookup("curvature"))),