diff --git a/src/common/intrusive_list.h b/src/common/intrusive_list.h index 084e57e3..e30d8f4e 100644 --- a/src/common/intrusive_list.h +++ b/src/common/intrusive_list.h @@ -47,7 +47,7 @@ public: * @param node Node to add to the list. */ void Prepend(T& node) { - AddAfter(root.get(), static_cast*>(&node)); + AddAfter(root.get(), &node); } /** @@ -55,7 +55,7 @@ public: * @param node Node to add to the list. */ void Append(T& node) { - AddBefore(root.get(), static_cast*>(&node)); + AddBefore(root.get(), &node); } /** @@ -64,7 +64,7 @@ public: * @param new_node Node to add to the list. */ void AddAfter(T& existing, T& node) { - AddAfter(static_cast*>(&existing), static_cast*>(&node)); + AddAfter(&existing, &node); } /** @@ -73,7 +73,7 @@ public: * @param new_node Node to add to the list. */ void AddBefore(T& existing, T& node) { - AddBefore(static_cast*>(&existing), static_cast*>(&node)); + AddBefore(&existing, &node); } /** @@ -208,7 +208,7 @@ IntrusiveListIterator IntrusiveList::erase(const IntrusiveListIterator& template IntrusiveListIterator IntrusiveList::iterator_to(T& item) { - return IntrusiveListIterator(root.get(), static_cast*>(&item)); + return IntrusiveListIterator(root.get(), &item); } template @@ -223,7 +223,7 @@ IntrusiveListIterator IntrusiveList::end() const { template IntrusiveListIterator IntrusiveList::iterator_to(T& item) const { - return IntrusiveListIterator(root.get(), static_cast*>(&item)); + return IntrusiveListIterator(root.get(), &item); } } // namespace Common