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:
@ -122,7 +122,7 @@ Foam::rigidBodyMeshMotion::rigidBodyMeshMotion
|
||||
{
|
||||
if (rhoName_ == "rhoInf")
|
||||
{
|
||||
rhoInf_ = readScalar(coeffDict().lookup("rhoInf"));
|
||||
readEntry("rhoInf", rhoInf_);
|
||||
}
|
||||
|
||||
if (coeffDict().found("ramp"))
|
||||
|
||||
Reference in New Issue
Block a user