3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 20:05:51 +00:00

remove some allocs from exceptions

This commit is contained in:
Nuno Lopes 2018-07-02 17:08:02 +01:00
parent 8791f61aa7
commit cef17c22a1
19 changed files with 36 additions and 40 deletions

View file

@ -59,7 +59,7 @@ public:
if (c == nullptr) {
std::string err_msg("unknown command '");
err_msg = err_msg + s.bare_str() + "'";
throw cmd_exception(err_msg);
throw cmd_exception(std::move(err_msg));
}
m_cmds.push_back(s);
}
@ -384,7 +384,7 @@ class set_option_cmd : public set_get_option_cmd {
std::string msg = "error setting '";
msg += opt_name.str();
msg += "', option value cannot be modified after initialization";
throw cmd_exception(msg);
throw cmd_exception(std::move(msg));
}
}