mirror of
https://github.com/Z3Prover/z3
synced 2025-12-10 05:43:22 +00:00
Use const refs to reduce copying.
These are things that have been found by `clang-tidy`.
This commit is contained in:
parent
5a16d3ef7f
commit
177414c0ee
28 changed files with 62 additions and 62 deletions
|
|
@ -3418,7 +3418,7 @@ expr_ref context::get_constraints (unsigned level)
|
|||
return m_pm.mk_and (constraints);
|
||||
}
|
||||
|
||||
void context::add_constraints (unsigned level, expr_ref c)
|
||||
void context::add_constraints (unsigned level, const expr_ref& c)
|
||||
{
|
||||
if (!c.get()) { return; }
|
||||
if (m.is_true(c)) { return; }
|
||||
|
|
|
|||
|
|
@ -833,7 +833,7 @@ public:
|
|||
pob& get_root() const { return m_pob_queue.get_root(); }
|
||||
|
||||
expr_ref get_constraints (unsigned lvl);
|
||||
void add_constraints (unsigned lvl, expr_ref c);
|
||||
void add_constraints (unsigned lvl, const expr_ref& c);
|
||||
};
|
||||
|
||||
inline bool pred_transformer::use_native_mbp () {return ctx.use_native_mbp ();}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace spacer
|
|||
return m_num_cols;
|
||||
}
|
||||
|
||||
rational spacer_matrix::get(unsigned int i, unsigned int j)
|
||||
const rational& spacer_matrix::get(unsigned int i, unsigned int j)
|
||||
{
|
||||
SASSERT(i < m_num_rows);
|
||||
SASSERT(j < m_num_cols);
|
||||
|
|
@ -50,7 +50,7 @@ namespace spacer
|
|||
return m_matrix[i][j];
|
||||
}
|
||||
|
||||
void spacer_matrix::set(unsigned int i, unsigned int j, rational v)
|
||||
void spacer_matrix::set(unsigned int i, unsigned int j, const rational& v)
|
||||
{
|
||||
SASSERT(i < m_num_rows);
|
||||
SASSERT(j < m_num_cols);
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ namespace spacer {
|
|||
unsigned num_rows();
|
||||
unsigned num_cols();
|
||||
|
||||
rational get(unsigned i, unsigned j);
|
||||
void set(unsigned i, unsigned j, rational v);
|
||||
const rational& get(unsigned i, unsigned j);
|
||||
void set(unsigned i, unsigned j, const rational& v);
|
||||
|
||||
unsigned perform_gaussian_elimination();
|
||||
|
||||
|
|
|
|||
|
|
@ -301,7 +301,7 @@ public:
|
|||
void operator()(quantifier*) {}
|
||||
};
|
||||
|
||||
void unsat_core_learner::collect_symbols_b(expr_set axioms_b)
|
||||
void unsat_core_learner::collect_symbols_b(const expr_set& axioms_b)
|
||||
{
|
||||
expr_mark visited;
|
||||
collect_pure_proc proc(m_symbols_b);
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ namespace spacer {
|
|||
private:
|
||||
ptr_vector<unsat_core_plugin> m_plugins;
|
||||
func_decl_set m_symbols_b; // symbols, which occur in any b-asserted formula
|
||||
void collect_symbols_b(expr_set axioms_b);
|
||||
void collect_symbols_b(const expr_set& axioms_b);
|
||||
|
||||
ast_mark m_a_mark;
|
||||
ast_mark m_b_mark;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue