3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00
This commit is contained in:
Nikolaj Bjorner 2023-10-10 19:24:21 +09:00
parent 7afa4d0752
commit e8e636c3ec
2 changed files with 12 additions and 20 deletions

View file

@ -91,8 +91,9 @@ public:
struct scoped_limits {
reslimit& m_limit;
unsigned m_sz;
scoped_limits(reslimit& lim): m_limit(lim), m_sz(0) {}
~scoped_limits() { for (unsigned i = 0; i < m_sz; ++i) m_limit.pop_child(); }
unsigned m_sz = 0;
scoped_limits(reslimit& lim): m_limit(lim) {}
~scoped_limits() { reset(); }
void reset() { for (unsigned i = 0; i < m_sz; ++i) m_limit.pop_child(); m_sz = 0; }
void push_child(reslimit* lim) { m_limit.push_child(lim); ++m_sz; }
};