mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: use Zero when zero-initializing types
- makes the intent clearer and avoids the need for additional
constructor casting. Eg,
labelList(10, Zero) vs. labelList(10, 0)
scalarField(10, Zero) vs. scalarField(10, scalar(0))
vectorField(10, Zero) vs. vectorField(10, vector::zero)
This commit is contained in:
@ -42,7 +42,7 @@ namespace Foam
|
||||
Foam::fvMotionSolverEngineMesh::fvMotionSolverEngineMesh(const IOobject& io)
|
||||
:
|
||||
engineMesh(io),
|
||||
pistonLayers_("pistonLayers", dimLength, 0.0),
|
||||
pistonLayers_("pistonLayers", dimLength, Zero),
|
||||
motionSolver_
|
||||
(
|
||||
*this,
|
||||
|
||||
@ -42,7 +42,7 @@ namespace Foam
|
||||
Foam::layeredEngineMesh::layeredEngineMesh(const IOobject& io)
|
||||
:
|
||||
engineMesh(io),
|
||||
pistonLayers_("pistonLayers", dimLength, 0.0)
|
||||
pistonLayers_("pistonLayers", dimLength, Zero)
|
||||
{
|
||||
engineDB_.engineDict().readIfPresent("pistonLayers", pistonLayers_);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user