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

- reduced clutter when iterating over containers
This commit is contained in:
Mark Olesen
2019-01-07 09:20:51 +01:00
committed by Andrew Heather
parent a766d38643
commit bd78da22e7
11 changed files with 59 additions and 84 deletions

View File

@ -913,13 +913,12 @@ Foam::label Foam::meshRefinement::splitFacesUndo
forAll(map.faceMap(), facei)
{
label oldFacei = map.faceMap()[facei];
Map<label>::iterator oldFaceFnd = splitFaceToIndex.find
(
oldFacei
);
if (oldFaceFnd != splitFaceToIndex.end())
const auto oldFaceFnd = splitFaceToIndex.cfind(oldFacei);
if (oldFaceFnd.found())
{
labelPair& twoFaces = facePairs[oldFaceFnd()];
labelPair& twoFaces = facePairs[oldFaceFnd.val()];
if (twoFaces[0] == -1)
{
twoFaces[0] = facei;