From f13b8f669d5c3533962aa2c5cb56ed9779f11fa9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 30 Nov 2022 09:24:10 +0100 Subject: [PATCH] util/IntrusiveList: simplify ToHook() overload with const_cast --- src/util/IntrusiveList.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/IntrusiveList.hxx b/src/util/IntrusiveList.hxx index 75c6cd0fa..5abd7bce5 100644 --- a/src/util/IntrusiveList.hxx +++ b/src/util/IntrusiveList.hxx @@ -189,7 +189,7 @@ class IntrusiveList { } static constexpr const auto &ToHook(const T &t) noexcept { - return HookTraits::ToHook(t); + return HookTraits::ToHook(const_cast(t)); } static constexpr IntrusiveListNode &ToNode(T &t) noexcept {