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:
@ -911,7 +911,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
List<pointEdgeCollapse> allPointInfo;
|
||||
const globalIndex globalPoints(mesh.nPoints());
|
||||
labelList pointPriority(mesh.nPoints(), 0);
|
||||
labelList pointPriority(mesh.nPoints(), Zero);
|
||||
|
||||
collapser.consistentCollapse
|
||||
(
|
||||
|
||||
@ -219,7 +219,7 @@ Foam::cellList Foam::extrudedMesh::extrudedCells
|
||||
}
|
||||
|
||||
// Current face count per cell.
|
||||
labelList nCellFaces(eCells.size(), 0);
|
||||
labelList nCellFaces(eCells.size(), Zero);
|
||||
|
||||
|
||||
label facei = 0;
|
||||
|
||||
@ -2053,11 +2053,11 @@ int main(int argc, char *argv[])
|
||||
// Count how many patches on special edges of extrudePatch are necessary
|
||||
// - zoneXXX_sides
|
||||
// - zoneXXX_zoneYYY
|
||||
labelList zoneSidePatch(zoneNames.size(), 0);
|
||||
labelList zoneSidePatch(zoneNames.size(), Zero);
|
||||
// Patch to use for minZone
|
||||
labelList zoneZonePatch_min(zoneNames.size()*zoneNames.size(), 0);
|
||||
labelList zoneZonePatch_min(zoneNames.size()*zoneNames.size(), Zero);
|
||||
// Patch to use for maxZone
|
||||
labelList zoneZonePatch_max(zoneNames.size()*zoneNames.size(), 0);
|
||||
labelList zoneZonePatch_max(zoneNames.size()*zoneNames.size(), Zero);
|
||||
|
||||
countExtrudePatches
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user