3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 09:35:32 +00:00

fix up pareto callback mechanism

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2014-05-13 12:48:17 -07:00
parent 1ea376e310
commit 03979fd580
8 changed files with 178 additions and 144 deletions

View file

@ -133,9 +133,11 @@ public:
class scoped_push {
solver& s;
bool m_nopop;
public:
scoped_push(solver& s):s(s) { s.push(); }
~scoped_push() { s.pop(1); }
scoped_push(solver& s):s(s), m_nopop(false) { s.push(); }
~scoped_push() { if (!m_nopop) s.pop(1); }
void disable_pop() { m_nopop = true; }
};
};