Merge pull request #13143 from willnationsdev/list-insert-before-after-fix
Fixes List<T>::insert_before/after
This commit is contained in:
commit
ba891a0e8b
1 changed files with 4 additions and 0 deletions
|
@ -306,6 +306,8 @@ public:
|
|||
|
||||
if (!p_element->next_ptr) {
|
||||
_data->last = n;
|
||||
} else {
|
||||
p_element->next_ptr->prev_ptr = n;
|
||||
}
|
||||
|
||||
p_element->next_ptr = n;
|
||||
|
@ -330,6 +332,8 @@ public:
|
|||
|
||||
if (!p_element->prev_ptr) {
|
||||
_data->first = n;
|
||||
} else {
|
||||
p_element->prev_ptr->next_ptr = n;
|
||||
}
|
||||
|
||||
p_element->prev_ptr = n;
|
||||
|
|
Loading…
Reference in a new issue