mirror of
https://github.com/Z3Prover/z3
synced 2025-04-20 07:36:38 +00:00
use loop instead of goto
This commit is contained in:
parent
88be5e6611
commit
17131983fe
|
@ -174,19 +174,16 @@ namespace polysat {
|
|||
// TODO: this doesn't always make sure we prefer smaller sizes... different suffixes would have to be interleaved.
|
||||
for (auto const& [w, offset] : m_overlaps) {
|
||||
for (auto& layer : m_units[w].get_layers()) {
|
||||
again:
|
||||
entry* e = find_overlap(w, layer, val);
|
||||
if (!e)
|
||||
continue;
|
||||
last = e;
|
||||
if (e->interval.is_proper())
|
||||
update_value_to_high(val, e);
|
||||
m_explain.push_back({ e, val });
|
||||
if (is_conflict()) {
|
||||
m_explain_kind = explain_t::conflict;
|
||||
return nullptr;
|
||||
while (entry* e = find_overlap(w, layer, val)) {
|
||||
last = e;
|
||||
if (e->interval.is_proper())
|
||||
update_value_to_high(val, e);
|
||||
m_explain.push_back({ e, val });
|
||||
if (is_conflict()) {
|
||||
m_explain_kind = explain_t::conflict;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
goto again;
|
||||
}
|
||||
}
|
||||
return last;
|
||||
|
|
Loading…
Reference in a new issue