mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
- use the dictionary 'get' methods instead of readScalar for
additional checking
Unchecked: readScalar(dict.lookup("key"));
Checked: dict.get<scalar>("key");
- In templated classes that also inherit from a dictionary, an additional
'template' keyword will be required. Eg,
this->coeffsDict().template get<scalar>("key");
For this common use case, the predefined getXXX shortcuts may be
useful. Eg,
this->coeffsDict().getScalar("key");
This commit is contained in:
@ -73,7 +73,7 @@ CONSTRUCT
|
||||
)
|
||||
:
|
||||
PARENT(p, iF),
|
||||
scalarData_(readScalar(dict.lookup("scalarData"))),
|
||||
scalarData_(dict.get<scalar>("scalarData")),
|
||||
data_(pTraits<TYPE>(dict.lookup("data"))),
|
||||
fieldData_("fieldData", dict, p.size()),
|
||||
timeVsData_(Function1<TYPE>::New("timeVsData", dict)),
|
||||
|
||||
Reference in New Issue
Block a user