ENH: for-range, forAllIters() ... in applications/utilities

- reduced clutter when iterating over containers
This commit is contained in:
Mark Olesen
2019-01-07 09:20:51 +01:00
parent 1458b4f689
commit 14a404170b
76 changed files with 592 additions and 728 deletions

View File

@ -284,10 +284,8 @@ int main(int argc, char *argv[])
faceSet faceLabels(mesh, setName);
Info<< "Read " << faceLabels.size() << " faces to repatch ..." << endl;
forAllConstIter(faceSet, faceLabels, iter)
for (const label facei : faceLabels)
{
label facei = iter.key();
if (repatchFace(mesh, bMesh, nearest, patchMap, facei, meshMod))
{
nChanged++;
@ -298,11 +296,11 @@ int main(int argc, char *argv[])
{
forAll(nearest, bFacei)
{
label facei = mesh.nInternalFaces() + bFacei;
const label facei = mesh.nInternalFaces() + bFacei;
if (repatchFace(mesh, bMesh, nearest, patchMap, facei, meshMod))
{
nChanged++;
++nChanged;
}
}
}