3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-05-15 22:55:33 +00:00

simplify: replace ad-hoc reset_unsafe RAII with on_scope_exit in solve_eqs::reduce() (#9383)

* Initial plan

* simplify: replace reset_unsafe RAII struct with on_scope_exit in solve_eqs::reduce()

Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/ff5650aa-02db-4a71-976f-845debd7222f

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
Copilot 2026-04-26 22:21:02 +02:00 committed by GitHub
parent 0e07b218bc
commit 245c117aba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -244,12 +244,7 @@ namespace euf {
unsigned count = 0;
vector<dependent_expr> old_fmls;
dep_eq_vector eqs;
struct reset_unsafe {
solve_eqs& s;
reset_unsafe(solve_eqs& s): s(s) {}
~reset_unsafe() { s.m_unsafe_vars.reset(); }
};
reset_unsafe ru(*this);
auto _reset_unsafe = on_scope_exit([&]() { m_unsafe_vars.reset(); });
do {
old_fmls.reset();
m_subst_ids.reset();