diff options
author | Will Nations <willnationsdev@gmail.com> | 2017-11-21 10:51:38 -0600 |
---|---|---|
committer | Will Nations <willnationsdev@gmail.com> | 2017-11-21 10:51:38 -0600 |
commit | 52f73a153d524ea927e1a1f3efcade36a3bd3ca5 (patch) | |
tree | a755afac7ba9da49fe01f68b0e8338bd5005c7ec | |
parent | 64caa4733caa459f2dc2eb6eecf88053fa6a484b (diff) |
Fixes List<T>::insert_before/after
-rw-r--r-- | core/list.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/list.h b/core/list.h index da201e9868..448be4a5ab 100644 --- a/core/list.h +++ b/core/list.h @@ -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; |