diff --git a/include/const_list.h b/include/const_list.h index 219ac72..5b8b8c5 100644 --- a/include/const_list.h +++ b/include/const_list.h @@ -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 constexpr void const_list_node::push_before(const_list_node *node) noexcept { + node->_prev->_next = node->_next; + node->_next->_prev = node->_prev; + node->_prev = _prev; node->_next = this;