mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
remove some copies/moves
This commit is contained in:
parent
1d224d1bcd
commit
43f7636826
7 changed files with 27 additions and 28 deletions
|
@ -234,8 +234,7 @@ std::ostream& operator<<(std::ostream& out, sort_size const & ss) {
|
|||
// -----------------------------------
|
||||
std::ostream & operator<<(std::ostream & out, sort_info const & info) {
|
||||
operator<<(out, static_cast<decl_info const&>(info));
|
||||
out << " :size " << info.get_num_elements();
|
||||
return out;
|
||||
return out << " :size " << info.get_num_elements();
|
||||
}
|
||||
|
||||
// -----------------------------------
|
||||
|
@ -2237,7 +2236,7 @@ app * ast_manager::mk_app(func_decl * decl, unsigned num_args, expr * const * ar
|
|||
std::ostringstream buffer;
|
||||
buffer << "Wrong number of arguments (" << num_args
|
||||
<< ") passed to function " << mk_pp(decl, *this);
|
||||
throw ast_exception(buffer.str());
|
||||
throw ast_exception(std::move(buffer).str());
|
||||
}
|
||||
app * r = nullptr;
|
||||
if (num_args == 1 && decl->is_chainable() && decl->get_arity() == 2) {
|
||||
|
|
|
@ -886,8 +886,8 @@ app * bv_util::mk_numeral(rational const & val, unsigned bv_size) const {
|
|||
}
|
||||
|
||||
sort * bv_util::mk_sort(unsigned bv_size) {
|
||||
parameter p[1] = { parameter(bv_size) };
|
||||
return m_manager.mk_sort(get_fid(), BV_SORT, 1, p);
|
||||
parameter p(bv_size);
|
||||
return m_manager.mk_sort(get_fid(), BV_SORT, 1, &p);
|
||||
}
|
||||
|
||||
unsigned bv_util::get_int2bv_size(parameter const& p) {
|
||||
|
|
|
@ -69,8 +69,8 @@ namespace datatype {
|
|||
domain.push_back(a->instantiate(ps)->get_range());
|
||||
}
|
||||
sort_ref range = get_def().instantiate(ps);
|
||||
parameter pas[1] = { parameter(name()) };
|
||||
return func_decl_ref(m.mk_func_decl(u().get_family_id(), OP_DT_CONSTRUCTOR, 1, pas, domain.size(), domain.data(), range), m);
|
||||
parameter pas(name());
|
||||
return func_decl_ref(m.mk_func_decl(u().get_family_id(), OP_DT_CONSTRUCTOR, 1, &pas, domain.size(), domain.data(), range), m);
|
||||
}
|
||||
|
||||
func_decl_ref constructor::instantiate(sort* dt) const {
|
||||
|
@ -1052,8 +1052,8 @@ namespace datatype {
|
|||
func_decl * util::get_constructor_is(func_decl * con) {
|
||||
SASSERT(is_constructor(con));
|
||||
sort * datatype = con->get_range();
|
||||
parameter ps[1] = { parameter(con)};
|
||||
return m.mk_func_decl(fid(), OP_DT_IS, 1, ps, 1, &datatype);
|
||||
parameter ps(con);
|
||||
return m.mk_func_decl(fid(), OP_DT_IS, 1, &ps, 1, &datatype);
|
||||
}
|
||||
|
||||
func_decl * util::get_constructor_recognizer(func_decl * con) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue