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:
Mark Olesen
2018-12-11 23:50:15 +01:00
parent 6e8cf684d1
commit 1d85fecf4d
342 changed files with 814 additions and 803 deletions

View File

@ -542,7 +542,7 @@ int main(int argc, char *argv[])
// Now split the boundary faces into external and internal faces. All
// faces go into faceZones and external faces go into patches.
List<faceList> patchFaces(slPatchCells.size());
labelList patchNFaces(slPatchCells.size(), 0);
labelList patchNFaces(slPatchCells.size(), Zero);
forAll(boundary, patchi)
{
const faceList& bFaces = boundary[patchi];

View File

@ -936,7 +936,7 @@ int main(int argc, char *argv[])
labelListList cellFaces(nCells);
labelList nFacesInCell(nCells, 0);
labelList nFacesInCell(nCells, Zero);
forAll(cellFaces, celli)
{