Kaydet (Commit) 9b2451fa authored tarafından Thorsten Behrens's avatar Thorsten Behrens

Add missing operator++/-- overloads to kludge class.

(to fix the build after the cppcheck cleanup)
üst bcb9328d
...@@ -95,6 +95,8 @@ public: ...@@ -95,6 +95,8 @@ public:
// bug-compatible with original LinkedList.h/cxx: Ignore parameter! // bug-compatible with original LinkedList.h/cxx: Ignore parameter!
void operator++( int ); /// advance iterator by one step (ignore n !!!) void operator++( int ); /// advance iterator by one step (ignore n !!!)
void operator--( int ); /// go one step backwards (ignore n !!!) void operator--( int ); /// go one step backwards (ignore n !!!)
void operator++(); /// advance iterator by one step
void operator--(); /// go one step backwards
private: private:
bool valid(); bool valid();
...@@ -274,6 +276,20 @@ void LinkedListIterator<T>::operator--( int ) ...@@ -274,6 +276,20 @@ void LinkedListIterator<T>::operator--( int )
mnPosition --; mnPosition --;
} }
template<class T>
void LinkedListIterator<T>::operator++()
{
ASSERT( mpList != NULL );
mnPosition ++;
}
template<class T>
void LinkedListIterator<T>::operator--()
{
ASSERT( mpList != NULL );
mnPosition --;
}
template<class T> template<class T>
bool LinkedListIterator<T>::valid() bool LinkedListIterator<T>::valid()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment