From a0dc398f369612b45fc603551240c5e6f19286cd Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 25 Feb 2021 14:00:26 +0100 Subject: [PATCH] util/IntrusiveList: erase() returns an iterator --- src/util/IntrusiveList.hxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/IntrusiveList.hxx b/src/util/IntrusiveList.hxx index e97abc60d..0243ce737 100644 --- a/src/util/IntrusiveList.hxx +++ b/src/util/IntrusiveList.hxx @@ -319,8 +319,10 @@ public: return {&t}; } - void erase(iterator i) noexcept { + iterator erase(iterator i) noexcept { + auto result = std::next(i); ToHook(*i).unlink(); + return result; } void push_front(T &t) noexcept {