small fix to List.h, the post-increment iterators should return "const" objects to disallow constructs such as i++++
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user