mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
- instead of dict.lookup(name) >> val;
can use dict.readEntry(name, val);
for checking of input token sizes.
This helps catch certain types of input errors:
{
key1 ; // <- Missing value
key2 1234 // <- Missing ';' terminator
key3 val;
}
STYLE: readIfPresent() instead of 'if found ...' in a few more places.
This commit is contained in:
@ -56,7 +56,7 @@ Foam::surfaceFeaturesExtraction::extractFromFile::extractFromFile
|
||||
const dictionary& coeffDict =
|
||||
dict.optionalSubDict("extractFromFileCoeffs");
|
||||
|
||||
coeffDict.lookup("featureEdgeFile") >> featureEdgeFile_;
|
||||
coeffDict.readEntry("featureEdgeFile", featureEdgeFile_);
|
||||
coeffDict.readIfPresent("geometricTestOnly", geometricTestOnly_);
|
||||
}
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ Foam::surfaceFeaturesExtraction::extractFromSurface::extractFromSurface
|
||||
const dictionary& coeffDict =
|
||||
dict.optionalSubDict("extractFromSurfaceCoeffs");
|
||||
|
||||
coeffDict.lookup("includedAngle") >> includedAngle_;
|
||||
coeffDict.readEntry("includedAngle", includedAngle_);
|
||||
coeffDict.readIfPresent("geometricTestOnly", geometricTestOnly_);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user