Fix List::move_before for front and back elements

This commit is contained in:
sheepandshepherd 2015-07-10 21:33:44 +02:00
parent f697ec2fe0
commit db440a2a58

View file

@ -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) {