[Scummvm-cvs-logs] CVS: scummvm/common list.h,1.19,1.20
Max Horn
fingolfin at users.sourceforge.net
Tue Dec 14 12:58:03 CET 2004
Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5164
Modified Files:
list.h
Log Message:
Patch #1083548 (common/list enhancement)
Index: list.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/list.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- list.h 12 Dec 2004 21:54:33 -0000 1.19
+++ list.h 14 Dec 2004 20:57:23 -0000 1.20
@@ -164,9 +164,14 @@
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) {
More information about the Scummvm-git-logs
mailing list