small fix to List.h, the post-increment iterators should return "const" objects to disallow constructs such as i++++

This commit is contained in:
Mathias Agopian
2009-04-27 21:40:53 -07:00
parent 81b0aa696a
commit 77c4903397

View File

@@ -84,7 +84,7 @@ public:
mpNode = mpNode->getNext();
return *this;
}
_Iter operator++(int) { // post-increment
const _Iter operator++(int) { // post-increment
_Iter tmp = *this;
++*this;
return tmp;
@@ -93,7 +93,7 @@ public:
mpNode = mpNode->getPrev();
return *this;
}
_Iter operator--(int) { // post-increment
const _Iter operator--(int) { // post-increment
_Iter tmp = *this;
--*this;
return tmp;