mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
add colors
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
commit
4c6e2acd45
56 changed files with 419 additions and 195 deletions
|
@ -74,6 +74,10 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
static void detach(T* elem) {
|
||||
elem->init(elem);
|
||||
}
|
||||
|
||||
bool invariant() const {
|
||||
auto* e = this;
|
||||
do {
|
||||
|
@ -84,6 +88,20 @@ public:
|
|||
while (e != this);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
static bool contains(T* list, T* elem) {
|
||||
if (!list)
|
||||
return false;
|
||||
T* first = list;
|
||||
do {
|
||||
if (list == elem)
|
||||
return true;
|
||||
list = list->m_next;
|
||||
}
|
||||
while (list != first);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue