mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
STYLE: check iterator validity with good() instead of found()
- aligns better with other container checks
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user