Skip to content

Commit

Permalink
Merge pull request #136 from MonsterDruide1/tlist-insert-list
Browse files Browse the repository at this point in the history
container/TList: Change mList of node during insert
  • Loading branch information
leoetlino authored May 6, 2024
2 parents bf18646 + 8cdf6eb commit 3f5be09
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/container/seadTList.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,15 @@ class TList : public ListImpl

void insertBefore(TListNode<T>* node, TListNode<T>* node_to_insert)
{
node_to_insert->erase();
node_to_insert->mList = this;
ListImpl::insertBefore(node, node_to_insert);
}

void insertAfter(TListNode<T>* node, TListNode<T>* node_to_insert)
{
node_to_insert->erase();
node_to_insert->mList = this;
ListImpl::insertAfter(node, node_to_insert);
}

Expand Down

0 comments on commit 3f5be09

Please sign in to comment.