mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
viable 2 with dlist
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
0bec8520e1
commit
c9f5ce43b2
7 changed files with 128 additions and 45 deletions
|
@ -40,6 +40,14 @@ public:
|
|||
remove_from(list, head);
|
||||
return head;
|
||||
}
|
||||
|
||||
void insert(T* elem) {
|
||||
T* next = this->m_next;
|
||||
elem->m_prev = next->m_prev;
|
||||
elem->m_next = next;
|
||||
this->m_next = elem;
|
||||
next->m_prev = elem;
|
||||
}
|
||||
|
||||
static void remove_from(T*& list, T* elem) {
|
||||
if (list->m_next == list) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue