diff --git a/src/util/IntrusiveList.hxx b/src/util/IntrusiveList.hxx index cfd189a75..58e563b65 100644 --- a/src/util/IntrusiveList.hxx +++ b/src/util/IntrusiveList.hxx @@ -535,6 +535,17 @@ public: ++counter; } + /** + * Move one item of the given list to this one before the + * given position. + */ + void splice(iterator position, + IntrusiveList &from, iterator i) noexcept { + auto &item = *i; + from.erase(i); + insert(position, item); + } + /** * Move the given range of items of the given list to this one * before the given position.