diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/list.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/common/list.h b/common/list.h index a5c0d69c99..8fb59a12a9 100644 --- a/common/list.h +++ b/common/list.h @@ -72,7 +72,11 @@ public: } // Postfix inc Iterator<T2> operator++(int) { +#ifndef PALMOS_MODE Iterator<T2> tmp(_node); +#else + Iterator tmp(_node); +#endif if (_node) _node = _node->_next; return tmp; @@ -85,7 +89,11 @@ public: } // Postfix dec Iterator<T2> operator--(int) { +#ifndef PALMOS_MODE Iterator<T2> tmp(_node); +#else + Iterator tmp(_node); +#endif if (_node) _node = _node->_prev; return tmp; @@ -177,15 +185,9 @@ public: } iterator erase(iterator first, iterator last) { - while (first != last) { -#ifndef PALMOS_MODE + while (first != last) erase(first++); -#else - iterator tmp = first._node->_next; - erase(first); - first = tmp; -#endif - } + return last; } |