From ede24fabe2ea65e8d08800e246cea8eb7f12dfca Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 14 Dec 2004 20:57:23 +0000 Subject: Patch #1083548 (common/list enhancement) svn-id: r16046 --- common/list.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'common') 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& operator =(const List& list) { -- cgit v1.2.3