mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +00:00
AK: Use IntrusiveList::remove() in the IntrusiveList::prepend() prolog
All other functions use the functionality for removal, use it in the prepend function as well for consistency.
This commit is contained in:
parent
13dc26eb0f
commit
4586668fc3
1 changed files with 2 additions and 3 deletions
|
@ -248,10 +248,9 @@ inline void IntrusiveList<T, Container, member>::append(T& n)
|
||||||
template<class T, typename Container, IntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, IntrusiveListNode<T, Container> T::*member>
|
||||||
inline void IntrusiveList<T, Container, member>::prepend(T& n)
|
inline void IntrusiveList<T, Container, member>::prepend(T& n)
|
||||||
{
|
{
|
||||||
auto& nnode = n.*member;
|
remove(n);
|
||||||
if (nnode.m_storage)
|
|
||||||
nnode.remove();
|
|
||||||
|
|
||||||
|
auto& nnode = n.*member;
|
||||||
nnode.m_storage = &m_storage;
|
nnode.m_storage = &m_storage;
|
||||||
nnode.m_prev = nullptr;
|
nnode.m_prev = nullptr;
|
||||||
nnode.m_next = m_storage.m_first;
|
nnode.m_next = m_storage.m_first;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue