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

@ -45,10 +45,7 @@ Foam::fvMotionSolverEngineMesh::fvMotionSolverEngineMesh(const IOobject& io)
pistonLayers_("pistonLayers", dimLength, 0.0),
motionSolver_(*this, engineDB_.engineDict().lookup("motionSolver"))
{
if (engineDB_.engineDict().found("pistonLayers"))
{
engineDB_.engineDict().lookup("pistonLayers") >> pistonLayers_;
}
engineDB_.engineDict().readIfPresent("pistonLayers", pistonLayers_);
}