mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: check iterator validity with good() instead of found()
- aligns better with other container checks
This commit is contained in:
@ -41,7 +41,7 @@ Foam::autoPtr<Foam::binModel> Foam::binModel::New
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
if (!cstrIter.good())
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
|
||||
@ -607,7 +607,7 @@ bool Foam::functionObjects::externalCoupled::read(const dictionary& dict)
|
||||
const wordList writeFields(groupDict.get<wordList>("writeFields"));
|
||||
|
||||
auto fnd = regionToGroups_.find(regionGroupNames_.last());
|
||||
if (fnd.found())
|
||||
if (fnd.good())
|
||||
{
|
||||
fnd().append(nGroups);
|
||||
}
|
||||
|
||||
@ -211,7 +211,7 @@ bool Foam::functionObjects::runTimeControls::runTimeControl::execute()
|
||||
|
||||
auto conditionIter = groupMap_.cfind(groupi);
|
||||
|
||||
if (!conditionIter.found())
|
||||
if (!conditionIter.good())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "group " << groupi << " not found in map"
|
||||
|
||||
Reference in New Issue
Block a user