| 588 | } |
| 589 | |
| 590 | void push_front(I *const & item) |
| 591 | { |
| 592 | auto root = static_cast<L *>(this); |
| 593 | auto link = new L(); |
| 594 | link->prev = root; |
| 595 | if (root->next) |
| 596 | { |
| 597 | root->next->prev = link; |
| 598 | link->next = root->next; |
| 599 | } |
| 600 | link->item = item; |
| 601 | item->dfhack_set_list_link(link); |
| 602 | root->next = link; |
| 603 | } |
| 604 | |
| 605 | static_assert(std::bidirectional_iterator<iterator>); |
| 606 | static_assert(std::bidirectional_iterator<const_iterator>); |