STYLE: used guarded read in runTimeControl

This commit is contained in:
Mark Olesen
2019-01-24 10:03:33 +01:00
parent 1c85c64984
commit 1910ebc0ad
5 changed files with 14 additions and 24 deletions

View File

@ -70,9 +70,9 @@ Foam::functionObjects::runTimeControls::averageCondition::averageCondition
window_(dict.lookupOrDefault<scalar>("window", -1)),
windowType_
(
window_ > 0 ?
windowTypeNames.read(dict.lookup("windowType"))
: windowType::NONE
window_ > 0
? windowTypeNames.get("windowType", dict)
: windowType::NONE
),
totalTime_(fieldNames_.size(), scalar(0)),
resetOnRestart_(dict.lookupOrDefault<bool>("resetOnRestart", false)),