mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: provide HashTable::iterator::found() method
- This can be used as a convenient alternative to comparing against end().
Eg,
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(methodType);
if (cstrIter.found())
{
...
}
vs.
if (cstrIter != dictionaryConstructorTablePtr_->end())
{
...
}
This commit is contained in:
@ -403,6 +403,10 @@ public:
|
||||
|
||||
// Access
|
||||
|
||||
//- True if iterator points to a hashedEntry.
|
||||
// This can be used instead of a comparison to end()
|
||||
inline bool found() const;
|
||||
|
||||
//- Return the Key corresponding to the iterator
|
||||
inline const Key& key() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user