mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use readIfPresent instead of found/lookup combination
This commit is contained in:
@ -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_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user