summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/list.h5
1 files changed, 5 insertions, 0 deletions
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();