aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/list.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/common/list.h b/common/list.h
index b37b8b1b64..1cf69f9500 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<T>& operator =(const List<T>& list) {