dictionary label lookup: simplified syntax using the type templated lookup function

Replaced
    readLabel(dict.lookup("name"))
with
    dict.lookup<label>("name)
This commit is contained in:
Henry Weller
2019-11-27 11:38:59 +00:00
parent f2f9fae27b
commit d987648ef4
90 changed files with 196 additions and 196 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -432,7 +432,7 @@ int main(int argc, char *argv[])
// Get requested numberOfSubdomains. Note: have no mesh yet so
// cannot use decompositionModel::New
const label nDomains =
readLabel(IOdictionary(dictIO).lookup("numberOfSubdomains"));
IOdictionary(dictIO).lookup<label>("numberOfSubdomains");
// Give file handler a chance to determine the output directory
const_cast<fileOperation&>(fileHandler()).setNProcs(nDomains);