fix valdiate in optimistic list

This commit is contained in:
2021-01-02 20:46:15 +01:00
parent 0979208f63
commit f41f09e028

View File

@@ -114,7 +114,7 @@ bool OptimisticSet::ctn(int element) {
bool OptimisticSet::validate(Node* p, Node* c) { bool OptimisticSet::validate(Node* p, Node* c) {
Node* n = this->first; Node* n = this->first;
while (n->is_smaller_than(p)) { while(n->next != c && n->next != 0) {
n = n->next; n = n->next;
} }
if ((n == p) && (p->next == c)) { if ((n == p) && (p->next == c)) {