dictionary scalar lookup: simplified syntax using the type templated lookup function
Replaced
readScalar(dict.lookup("name"))
with
dict.lookup<scalar>("name")
This commit is contained in:
@ -51,7 +51,7 @@ Foam::functionObjects::FUNCTIONOBJECT::FUNCTIONOBJECT
|
||||
:
|
||||
fvMeshFunctionObject(name, runTime, dict),
|
||||
wordData_(dict.lookupOrDefault<word>("wordData", "defaultWord")),
|
||||
scalarData_(readScalar(dict.lookup("scalarData"))),
|
||||
scalarData_(dict.lookup<scalar>("scalarData")),
|
||||
labelData_(dict.lookup<label>("labelData"))
|
||||
{
|
||||
read(dict);
|
||||
|
||||
Reference in New Issue
Block a user