🎨
This commit is contained in:
parent
e7ccd9c17c
commit
d322f0b6a7
3 changed files with 9 additions and 10 deletions
|
|
@ -303,8 +303,9 @@ inline StackPopResult stack__iter(Stack *self, StackVersion version,
|
|||
if (!link.tree->extra) {
|
||||
next_iterator->tree_count++;
|
||||
next_iterator->depth--;
|
||||
if (!link.is_pending)
|
||||
if (!link.is_pending) {
|
||||
next_iterator->is_pending = false;
|
||||
}
|
||||
}
|
||||
array_push(&next_iterator->trees, link.tree);
|
||||
ts_tree_retain(link.tree);
|
||||
|
|
@ -561,9 +562,8 @@ void ts_stack_force_merge(Stack *self, StackVersion version1, StackVersion versi
|
|||
for (uint32_t i = 0; i < head2->node->link_count; i++) {
|
||||
stack_node_add_link(head1->node, head2->node->links[i]);
|
||||
}
|
||||
if (head2->push_count > head1->push_count) {
|
||||
head1->push_count = head2->push_count;
|
||||
}
|
||||
if (head2->push_count > head1->push_count) head1->push_count = head2->push_count;
|
||||
if (head2->depth > head1->depth) head1->depth = head2->depth;
|
||||
ts_stack_remove_version(self, version2);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue