STYLE: use readIfPresent instead of found/lookup combination

This commit is contained in:
Mark Olesen
2010-05-20 08:52:45 +02:00
parent 227631742d
commit 9525d57d71
18 changed files with 114 additions and 162 deletions

View File

@ -76,11 +76,9 @@ sixDoFRigidBodyDisplacementPointPatchVectorField
rhoInf_ = readScalar(dict.lookup("rhoInf"));
}
if (dict.found("g"))
if (dict.readIfPresent("g", g_))
{
lookupGravity_ = -2;
g_ = dict.lookup("g");
}
if (!dict.found("value"))