Commit 3d4e4a21 authored by Mark Olesen's avatar Mark Olesen
Browse files

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)
parent e35ff65d
......@@ -819,7 +819,7 @@ void Foam::vtkPVFoam::renderPatchNames
// Find the total number of zones
// Each zone will take the patch name
// Number of zones per patch ... zero zones should be skipped
labelList nZones(pbMesh.size(), 0);
labelList nZones(pbMesh.size(), Zero);
// Per global zone number the average face centre position
List<DynamicList<point>> zoneCentre(pbMesh.size());
......@@ -862,7 +862,7 @@ void Foam::vtkPVFoam::renderPatchNames
nZones[patchi] = pZones.nZones();
labelList zoneNFaces(pZones.nZones(), 0);
labelList zoneNFaces(pZones.nZones(), Zero);
// Create storage for additional zone centres
forAll(zoneNFaces, zonei)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment