const_list: added linking of other linked nodes in const_list_node::push_before
This commit is contained in:
parent
af7a6baaf9
commit
5cda16f846
|
|
@ -454,8 +454,6 @@ namespace cc {
|
|||
first2 = next;
|
||||
}
|
||||
|
||||
other._tail._next = &other._tail;
|
||||
other._tail._prev = &other._tail;
|
||||
other._size = 0;
|
||||
}
|
||||
|
||||
|
|
@ -490,8 +488,6 @@ namespace cc {
|
|||
first2 = next;
|
||||
}
|
||||
|
||||
other._tail._next = &other._tail;
|
||||
other._tail._prev = &other._tail;
|
||||
other._size = 0;
|
||||
}
|
||||
|
||||
|
|
@ -569,6 +565,9 @@ namespace cc {
|
|||
template<typename D>
|
||||
constexpr void const_list_node<D>::push_before(const_list_node *node) noexcept
|
||||
{
|
||||
node->_prev->_next = node->_next;
|
||||
node->_next->_prev = node->_prev;
|
||||
|
||||
node->_prev = _prev;
|
||||
node->_next = this;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue