util/IntrusiveList: simplify ToHook() overload with const_cast

This commit is contained in:
Max Kellermann 2022-11-30 09:24:10 +01:00 committed by Max Kellermann
parent fa58db798b
commit f13b8f669d

View File

@ -189,7 +189,7 @@ class IntrusiveList {
} }
static constexpr const auto &ToHook(const T &t) noexcept { static constexpr const auto &ToHook(const T &t) noexcept {
return HookTraits::ToHook(t); return HookTraits::ToHook(const_cast<T &>(t));
} }
static constexpr IntrusiveListNode &ToNode(T &t) noexcept { static constexpr IntrusiveListNode &ToNode(T &t) noexcept {