3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-31 23:34:55 +00:00

more fixes

This commit is contained in:
Jakob Rath 2021-09-13 16:01:22 +02:00
parent b6c478c2ca
commit a4c3a8c640
2 changed files with 10 additions and 7 deletions

View file

@ -92,7 +92,7 @@ namespace polysat {
void init() {
first = m_search->size();
current = first - 1;
current = first; // we start one before the beginning
}
void try_push_block() {
@ -104,7 +104,8 @@ namespace polysat {
void pop_block() {
current = m_index_stack.back().current;
first = m_index_stack.back().first;
// We don't restore 'first', otherwise 'next()' will immediately push a new block again.
// Instead, the current block is merged with the popped one.
m_index_stack.pop_back();
}
@ -116,7 +117,6 @@ namespace polysat {
search_iterator(search_state& search):
m_search(&search) {
init();
current++; // we start one before the beginning, then it also works for empty m_search
}
search_item const& operator*() const {
@ -134,7 +134,7 @@ namespace polysat {
if (m_index_stack.empty())
return false;
pop_block();
return true;
return next();
}
}
};