diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-10-17 12:10:42 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-10-17 12:10:42 -0300 |
commit | 253d34b937b7ea59a8ac59cf52385725964a0f87 (patch) | |
tree | c9c7c2ff49c713e87a035daf3b6f39498a07759f | |
parent | 0bc6a8894cd25f917b693f059d3e2bb037509f2f (diff) | |
parent | db440a2a58a9f783322ffc528fe50e832f5ae50c (diff) |
Merge pull request #2256 from sheepandshepherd/list-edits
List::move_before updates front/back pointers, fixes #2255
-rw-r--r-- | core/list.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/list.h b/core/list.h index 6deb150ef6..018abca940 100644 --- a/core/list.h +++ b/core/list.h @@ -518,10 +518,16 @@ public: if (value->prev_ptr) { value->prev_ptr->next_ptr = value->next_ptr; - }; + } + else { + _data->first = value->next_ptr; + } if (value->next_ptr) { value->next_ptr->prev_ptr = value->prev_ptr; - }; + } + else { + _data->last = value->prev_ptr; + } value->next_ptr = where; if (!where) { |