mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -82,7 +82,7 @@ Foam::functionObjects::runTimeControls::runTimeCondition::runTimeCondition
|
||||
name_(name),
|
||||
obr_(obr),
|
||||
state_(state),
|
||||
active_(dict.lookupOrDefault<bool>("active", true)),
|
||||
active_(dict.lookupOrDefault("active", true)),
|
||||
conditionDict_(setConditionDict()),
|
||||
log_(dict.lookupOrDefault("log", true)),
|
||||
groupID_(dict.lookupOrDefault("groupID", -1))
|
||||
|
||||
@ -70,7 +70,7 @@ bool Foam::functionObjects::vtkWrite::read(const dictionary& dict)
|
||||
// writer options - default is xml base64
|
||||
//
|
||||
writeOpts_ = vtk::formatType::INLINE_BASE64;
|
||||
if (dict.lookupOrDefault<bool>("legacy", false))
|
||||
if (dict.lookupOrDefault("legacy", false))
|
||||
{
|
||||
writeOpts_.legacy(true);
|
||||
}
|
||||
@ -99,7 +99,7 @@ bool Foam::functionObjects::vtkWrite::read(const dictionary& dict)
|
||||
//
|
||||
dict.readIfPresent("directory", dirName_);
|
||||
|
||||
writeIds_ = dict.lookupOrDefault<bool>("writeIds", false);
|
||||
writeIds_ = dict.lookupOrDefault("writeIds", false);
|
||||
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user