[Scummvm-cvs-logs] SF.net SVN: scummvm: [31499] scummvm/trunk/common/list.h
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Mon Apr 14 12:07:15 CEST 2008
Revision: 31499
http://scummvm.svn.sourceforge.net/scummvm/?rev=31499&view=rev
Author: thebluegr
Date: 2008-04-14 03:07:15 -0700 (Mon, 14 Apr 2008)
Log Message:
-----------
Added contains() method to Common::List, same as in Common::Array
Modified Paths:
--------------
scummvm/trunk/common/list.h
Modified: scummvm/trunk/common/list.h
===================================================================
--- scummvm/trunk/common/list.h 2008-04-13 23:46:55 UTC (rev 31498)
+++ scummvm/trunk/common/list.h 2008-04-14 10:07:15 UTC (rev 31499)
@@ -26,6 +26,7 @@
#define COMMON_LIST_H
#include "common/scummsys.h"
+#include "common/algorithm.h"
namespace Common {
@@ -267,6 +268,10 @@
const_iterator end() const {
return const_iterator(const_cast<NodeBase*>(&_anchor));
}
+
+ bool contains(const t_T &key) const {
+ return find(begin(), end(), key) != end();
+ }
};
} // End of namespace Common
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list