From a87eb89017dad9d87719dd1bf6c3e5cbf9ed5759 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sat, 27 Nov 2010 09:07:51 +0100 Subject: Added List::del(). --- common/list.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/list.h b/common/list.h index 92452f1..d15913d 100644 --- a/common/list.h +++ b/common/list.h @@ -19,6 +19,11 @@ class List : public B { return std::find(B::begin(), B::end(), item) != B::end(); } + //! Delete item by index. + void del(std::size_t index) { + erase(B::begin() + index); + } + //! Check whether list is empty or not. operator bool() { return !B::empty(); -- cgit v1.2.3