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

- 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 655f7d1997
commit 5c6b0989a4
2 changed files with 23 additions and 39 deletions

View File

@ -638,10 +638,9 @@ void Foam::meshToMesh::distributeAndMergeCells
key[1] = max(proci, nbrProci[i]);
key[2] = localFacei[i];
procCoupleInfo::const_iterator fnd =
procFaceToGlobalCell.find(key);
const auto fnd = procFaceToGlobalCell.cfind(key);
if (fnd == procFaceToGlobalCell.end())
if (!fnd.found())
{
procFaceToGlobalCell.insert(key, -1);
}
@ -754,9 +753,9 @@ void Foam::meshToMesh::distributeAndMergeCells
key[1] = max(proci, nbrProci[i]);
key[2] = localFacei[i];
procCoupleInfo::iterator fnd = procFaceToGlobalCell.find(key);
auto fnd = procFaceToGlobalCell.find(key);
if (fnd != procFaceToGlobalCell.end())
if (fnd.found())
{
label tgtFacei = fnd();
if (tgtFacei == -1)