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:
@ -89,7 +89,7 @@ Foam::functionObjects::runTimePostPro::functionObjectBase::functionObjectBase
|
||||
fieldVisualisationBase(dict, colours),
|
||||
state_(state),
|
||||
functionObjectName_(""),
|
||||
clearObjects_(dict.lookupOrDefault<bool>("clearObjects", false))
|
||||
clearObjects_(dict.lookupOrDefault("clearObjects", false))
|
||||
{
|
||||
dict.lookup("functionObject") >> functionObjectName_;
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ Foam::functionObjects::runTimePostPro::text::text
|
||||
size_(readScalar(dict.lookup("size"))),
|
||||
colour_(nullptr),
|
||||
bold_(readBool(dict.lookup("bold"))),
|
||||
timeStamp_(dict.lookupOrDefault<bool>("timeStamp", false))
|
||||
timeStamp_(dict.lookupOrDefault("timeStamp", false))
|
||||
{
|
||||
if (dict.found("colour"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user