diff --git a/common/list.h b/common/list.h index 2fe07a5ccc1..7c514fd6f4b 100644 --- a/common/list.h +++ b/common/list.h @@ -26,6 +26,7 @@ #define COMMON_LIST_H #include "common/scummsys.h" +#include "common/algorithm.h" namespace Common { @@ -267,6 +268,10 @@ public: const_iterator end() const { return const_iterator(const_cast(&_anchor)); } + + bool contains(const t_T &key) const { + return find(begin(), end(), key) != end(); + } }; } // End of namespace Common