mirror of
https://github.com/Z3Prover/z3
synced 2026-06-19 07:06:28 +00:00
Replace inline depth_guard struct with on_scope_exit in datatype_factory.cpp
This commit is contained in:
parent
097372c779
commit
a90901b7c5
1 changed files with 2 additions and 1 deletions
|
|
@ -141,7 +141,8 @@ expr * datatype_factory::get_fresh_value(sort * s) {
|
|||
return m_model.get_fresh_value(s);
|
||||
if (m_fresh_depth >= m_max_fresh_depth)
|
||||
return get_last_fresh_value(s);
|
||||
struct depth_guard { unsigned& d; depth_guard(unsigned& d) : d(d) { ++d; } ~depth_guard() { --d; } } _dg(m_fresh_depth);
|
||||
++m_fresh_depth;
|
||||
on_scope_exit _dg([&]() { --m_fresh_depth; });
|
||||
TRACE(datatype, tout << "generating fresh value for: " << s->get_name() << "\n";);
|
||||
auto& [set, values] = get_value_set(s);
|
||||
// Approach 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue