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()) { ... }
Showing
- applications/test/Map/Test-Map.C 4 additions, 8 deletionsapplications/test/Map/Test-Map.C
- src/OpenFOAM/containers/HashTables/HashTable/HashTable.H 4 additions, 0 deletionssrc/OpenFOAM/containers/HashTables/HashTable/HashTable.H
- src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H 9 additions, 1 deletionsrc/OpenFOAM/containers/HashTables/HashTable/HashTableI.H
Please register or sign in to comment