Commit 4912466d authored by Max Kellermann's avatar Max Kellermann

util/IntrusiveList: add method erase()

parent 66467491
...@@ -312,6 +312,10 @@ public: ...@@ -312,6 +312,10 @@ public:
return {&t}; return {&t};
} }
void erase(iterator i) noexcept {
IntrusiveListHook(*i).unlink();
}
void push_front(T &t) noexcept { void push_front(T &t) noexcept {
auto &new_node = ToNode(t); auto &new_node = ToNode(t);
head.next->prev = &new_node; head.next->prev = &new_node;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment