3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 03:15:50 +00:00

remove spurious copies and inc_refs around ref_vector

This commit is contained in:
Nuno Lopes 2018-06-28 10:31:38 +01:00
parent eabe91cdef
commit 5de6628a5d
16 changed files with 49 additions and 53 deletions

View file

@ -281,7 +281,7 @@ namespace smt {
for (unsigned i = 0; i < m_num_literals; i++) {
expr_ref l(m);
ctx.literal2expr(m_literals[i], l);
lits.push_back(l);
lits.push_back(std::move(l));
}
if (lits.size() == 1)
return m.mk_th_lemma(m_th_id, lits.get(0), 0, nullptr, m_params.size(), m_params.c_ptr());
@ -407,12 +407,7 @@ namespace smt {
for (unsigned i = 0; i < m_num_literals; i++) {
bool sign = GET_TAG(m_literals[i]) != 0;
expr * v = UNTAG(expr*, m_literals[i]);
expr_ref l(m);
if (sign)
l = m.mk_not(v);
else
l = v;
lits.push_back(l);
lits.push_back(sign ? m.mk_not(v) : v);
}
if (lits.size() == 1)
return m.mk_th_lemma(m_th_id, lits.get(0), 0, nullptr, m_params.size(), m_params.c_ptr());