mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: replace DictionaryBase toc with sortedToc version (#1467)
- cannot rely on the entries having a keyword method STYLE: apply consistent hash table sizing for debug objects
This commit is contained in:
committed by
Andrew Heather
parent
9f11d892f5
commit
5213a4aa9d
@ -158,15 +158,10 @@ T* Foam::DictionaryBase<IDLListType, T>::lookup(const word& keyword)
|
||||
template<class IDLListType, class T>
|
||||
Foam::wordList Foam::DictionaryBase<IDLListType, T>::toc() const
|
||||
{
|
||||
wordList keywords(this->size());
|
||||
|
||||
label i = 0;
|
||||
for (auto iter = this->cbegin(); iter != this->cend(); ++iter)
|
||||
{
|
||||
keywords[i++] = iter().keyword();
|
||||
}
|
||||
|
||||
return keywords;
|
||||
// Cannot rely on the items themselves having a keyword() method
|
||||
// so simply return the toc() from the hashed entries
|
||||
// Make it sorted, since anything else would have no meaning.
|
||||
return hashedTs_.sortedToc();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user