STYLE: check iterator validity with good() instead of found()

- aligns better with other container checks
This commit is contained in:
Mark Olesen
2023-02-06 15:52:55 +01:00
parent 750381bd99
commit d597b3f959
132 changed files with 342 additions and 340 deletions

View File

@ -292,11 +292,11 @@ void addToInterface
auto iter = regionsToSize.find(interface);
if (iter.found())
if (iter.good())
{
// Check if zone present
auto zoneIter = iter().find(zoneID);
if (zoneIter.found())
if (zoneIter.good())
{
// Found zone. Increment count.
++(*zoneIter);
@ -408,7 +408,7 @@ void getInterfaceSizes
auto masterIter = regionsToSize.find(slaveIter.key());
if (masterIter.found())
if (masterIter.good())
{
// Same inter-region
Map<label>& masterInfo = *masterIter;
@ -419,7 +419,7 @@ void getInterfaceSizes
const label slaveSize = iter.val();
auto zoneIter = masterInfo.find(zoneID);
if (zoneIter.found())
if (zoneIter.good())
{
*zoneIter += slaveSize;
}