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
@ -681,8 +681,8 @@ int main(int argc, char *argv[])
fileName surfName(refineDict.lookup("surface"));
surfName.expand();
label nCutLayers(readLabel(refineDict.lookup("nCutLayers")));
label cellLimit(readLabel(refineDict.lookup("cellLimit")));
label nCutLayers(refineDict.lookup<label>("nCutLayers"));
label cellLimit(refineDict.lookup<label>("cellLimit"));
bool selectCut(readBool(refineDict.lookup("selectCut")));
bool selectInside(readBool(refineDict.lookup("selectInside")));
bool selectOutside(readBool(refineDict.lookup("selectOutside")));
@ -693,7 +693,7 @@ int main(int argc, char *argv[])
scalar curvature(readScalar(refineDict.lookup("curvature")));
scalar curvDist(readScalar(refineDict.lookup("curvatureDistance")));
pointField outsidePts(refineDict.lookup("outsidePoints"));
label refinementLimit(readLabel(refineDict.lookup("splitLevel")));
label refinementLimit(refineDict.lookup<label>("splitLevel"));
bool writeMesh(readBool(refineDict.lookup("writeMesh")));
Info<< "Cells to be used for meshing (0=false, 1=true):" << nl