3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-02-15 21:31:50 +00:00

Eliminate unnecessary copies with std::move for ref-counted types (#8591)

This commit is contained in:
Copilot 2026-02-13 12:16:47 +00:00 committed by copilot-swe-agent[bot]
parent 19ad2d5375
commit 295dbc601d
9 changed files with 12 additions and 14 deletions

View file

@ -220,7 +220,7 @@ namespace arith {
expr_ref eq(m.mk_eq(x->get_expr(), y->get_expr()), m);
if (!is_eq) eq = m.mk_not(eq);
args.push_back(arith.mk_int(1));
args.push_back(eq);
args.push_back(std::move(eq));
};
rational lc(1);
for (unsigned i = m_lit_head; i < m_lit_tail; ++i)

View file

@ -430,7 +430,7 @@ namespace q {
expr_ref meq = mk_or(meqs);
expr_ref veq = mk_or(veqs);
assert_expr(meq);
qb.domain_eqs.push_back(veq);
qb.domain_eqs.push_back(std::move(veq));
}
}

View file

@ -139,9 +139,8 @@ namespace recfun {
*/
void solver::disable_guard(expr* guard, expr_ref_vector const& guards) {
SASSERT(!is_enabled_guard(guard));
app_ref dlimit = m_util.mk_num_rounds_pred(m_num_rounds);
expr_ref_vector core(m);
core.push_back(dlimit);
core.push_back(m_util.mk_num_rounds_pred(m_num_rounds));
core.push_back(guard);
if (!m_guard2pending.contains(guard)) {
m_disabled_guards.push_back(guard);