From 77c4903397eb0fb81f641c0beb1762f42819357b Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Mon, 27 Apr 2009 21:40:53 -0700 Subject: [PATCH] small fix to List.h, the post-increment iterators should return "const" objects to disallow constructs such as i++++ --- include/utils/List.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/utils/List.h b/include/utils/List.h index 1a6be9ac9d902..1b01c417bdba5 100644 --- a/include/utils/List.h +++ b/include/utils/List.h @@ -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;