diff --git a/common/list.h b/common/list.h index b37b8b1b641..1cf69f95002 100644 --- a/common/list.h +++ b/common/list.h @@ -164,9 +164,14 @@ public: return last; } -// void remove(const T &val) { -// ... -// } + void remove(const T &val) { + iterator i = begin(); + while (i != end()) + if (val == i.operator*()) + i = erase(i); + else + ++i; + } List& operator =(const List& list) {