mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
HashTable minor iterator issues
- made const_iterator::operator* and const_iterator::operator() const only - added const versions of iterator::operator* and iterator::operator()
This commit is contained in:
@ -330,6 +330,9 @@ public:
|
||||
inline T& operator*();
|
||||
inline T& operator()();
|
||||
|
||||
inline const T& operator*() const;
|
||||
inline const T& operator()() const;
|
||||
|
||||
inline iterator& operator++();
|
||||
inline iterator operator++(int);
|
||||
|
||||
@ -389,8 +392,8 @@ public:
|
||||
inline bool operator==(const iterator&) const;
|
||||
inline bool operator!=(const iterator&) const;
|
||||
|
||||
inline const T& operator*();
|
||||
inline const T& operator()();
|
||||
inline const T& operator*() const;
|
||||
inline const T& operator()() const;
|
||||
|
||||
inline const_iterator& operator++();
|
||||
inline const_iterator operator++(int);
|
||||
|
||||
@ -220,16 +220,34 @@ inline bool Foam::HashTable<T, Key, Hash>::iterator::operator!=
|
||||
|
||||
|
||||
template<class T, class Key, class Hash>
|
||||
inline T& Foam::HashTable<T, Key, Hash>::iterator::operator*()
|
||||
inline T&
|
||||
Foam::HashTable<T, Key, Hash>::iterator::operator*()
|
||||
{
|
||||
return elmtPtr_->obj_;
|
||||
}
|
||||
|
||||
|
||||
template<class T, class Key, class Hash>
|
||||
inline T& Foam::HashTable<T, Key, Hash>::iterator::operator()()
|
||||
inline T&
|
||||
Foam::HashTable<T, Key, Hash>::iterator::operator()()
|
||||
{
|
||||
return operator*();
|
||||
return elmtPtr_->obj_;
|
||||
}
|
||||
|
||||
|
||||
template<class T, class Key, class Hash>
|
||||
inline const T&
|
||||
Foam::HashTable<T, Key, Hash>::iterator::operator*() const
|
||||
{
|
||||
return elmtPtr_->obj_;
|
||||
}
|
||||
|
||||
|
||||
template<class T, class Key, class Hash>
|
||||
inline const T&
|
||||
Foam::HashTable<T, Key, Hash>::iterator::operator()() const
|
||||
{
|
||||
return elmtPtr_->obj_;
|
||||
}
|
||||
|
||||
|
||||
@ -410,16 +428,18 @@ inline bool Foam::HashTable<T, Key, Hash>::const_iterator::operator!=
|
||||
|
||||
|
||||
template<class T, class Key, class Hash>
|
||||
inline const T& Foam::HashTable<T, Key, Hash>::const_iterator::operator*()
|
||||
inline const T&
|
||||
Foam::HashTable<T, Key, Hash>::const_iterator::operator*() const
|
||||
{
|
||||
return elmtPtr_->obj_;
|
||||
}
|
||||
|
||||
#ifndef __CINT__
|
||||
template<class T, class Key, class Hash>
|
||||
inline const T& Foam::HashTable<T, Key, Hash>::const_iterator::operator()()
|
||||
inline const T&
|
||||
Foam::HashTable<T, Key, Hash>::const_iterator::operator()() const
|
||||
{
|
||||
return operator*();
|
||||
return elmtPtr_->obj_;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user