mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +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:
@ -129,9 +129,9 @@ Foam::caseInfo::caseInfo(const Time& runTime, const word& regionName)
|
||||
forAll(conditionNames_, i)
|
||||
{
|
||||
const dictionary& dict = bcDict_.subDict(conditionNames_[i]);
|
||||
dict.lookup("category") >> patchCategories_[i];
|
||||
dict.lookup("type") >> patchTypes_[i];
|
||||
dict.lookup("patches") >> patchNames_[i];
|
||||
dict.readEntry("category", patchCategories_[i]);
|
||||
dict.readEntry("type", patchTypes_[i]);
|
||||
dict.readEntry("patches", patchNames_[i]);
|
||||
}
|
||||
|
||||
updateGeometricBoundaryField();
|
||||
|
||||
Reference in New Issue
Block a user