3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-09-07 02:11:08 +00:00

Use const refs to reduce copying.

These are things that have been found by `clang-tidy`.
This commit is contained in:
Bruce Mitchener 2018-01-30 21:43:56 +07:00
parent 5a16d3ef7f
commit 177414c0ee
28 changed files with 62 additions and 62 deletions

View file

@ -400,7 +400,7 @@ namespace datalog {
}
uint64 res;
if (!try_get_sort_constant_count(srt, res)) {
sort_size sz = srt->get_num_elements();
const sort_size & sz = srt->get_num_elements();
if (sz.is_finite()) {
res = sz.size();
}
@ -411,7 +411,7 @@ namespace datalog {
return res;
}
void context::set_argument_names(const func_decl * pred, svector<symbol> var_names)
void context::set_argument_names(const func_decl * pred, const svector<symbol> & var_names)
{
SASSERT(!m_argument_var_names.contains(pred));
m_argument_var_names.insert(pred, var_names);