mirror of
https://github.com/Z3Prover/z3
synced 2025-05-02 21:37:02 +00:00
move a few strings instead of copying
This commit is contained in:
parent
2417bedb98
commit
6a0c409b0f
14 changed files with 30 additions and 30 deletions
|
@ -482,7 +482,7 @@ namespace smt2 {
|
|||
if (context[0]) msg += ": ";
|
||||
msg += "unknown sort '";
|
||||
msg += id.str() + "'";
|
||||
throw parser_exception(msg.c_str());
|
||||
throw parser_exception(std::move(msg));
|
||||
}
|
||||
|
||||
void consume_sexpr() {
|
||||
|
@ -1633,7 +1633,7 @@ namespace smt2 {
|
|||
void unknown_var_const_name(symbol id) {
|
||||
std::string msg = "unknown constant/variable '";
|
||||
msg += id.str() + "'";
|
||||
throw parser_exception(msg.c_str());
|
||||
throw parser_exception(std::move(msg));
|
||||
}
|
||||
|
||||
rational m_last_bv_numeral; // for bv, bvbin, bvhex
|
||||
|
@ -2431,7 +2431,7 @@ namespace smt2 {
|
|||
buffer << "invalid function definition, sort mismatch. Expcected "
|
||||
<< mk_pp(f->get_range(), m()) << " but function body has sort "
|
||||
<< mk_pp(m().get_sort(body), m());
|
||||
throw parser_exception(buffer.str().c_str());
|
||||
throw parser_exception(buffer.str());
|
||||
}
|
||||
m_ctx.insert_rec_fun(f, bindings, ids, body);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue