diff options
author | sheepandshepherd <sheepandshepherd@users.noreply.github.com> | 2015-07-10 21:33:44 +0200 |
---|---|---|
committer | sheepandshepherd <sheepandshepherd@users.noreply.github.com> | 2015-07-10 21:33:44 +0200 |
commit | db440a2a58a9f783322ffc528fe50e832f5ae50c (patch) | |
tree | 4a5e34410c811593cc99e0e52adf3ec356eb488c /core | |
parent | f697ec2fe022583dde5f3ae650f49cfd7f237c33 (diff) |
Fix List::move_before for front and back elements
Diffstat (limited to 'core')
-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) { |