ENH: List/DynamicList appendUniq() method

- affords some code reduction.

STYLE: use HashSet insert() without found() check in more places
This commit is contained in:
Mark Olesen
2021-04-06 12:29:26 +02:00
committed by Andrew Heather
parent 6dc6d7ca9a
commit cdbc3e2de6
36 changed files with 166 additions and 341 deletions

View File

@ -494,10 +494,8 @@ bool Foam::fileMonitor::removeWatch(const label watchFd)
<< watchFile_[watchFd] << endl;
}
if (!freeWatchFds_.found(watchFd))
{
freeWatchFds_.append(watchFd);
}
freeWatchFds_.appendUniq(watchFd);
return watcher_->removeWatch(watchFd);
}