3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-06 15:25:46 +00:00

avoid a few str copies + symbol hiding

This commit is contained in:
Nuno Lopes 2019-03-08 10:13:46 +00:00
parent 70ada9919e
commit cd4b53500c
13 changed files with 22 additions and 33 deletions

View file

@ -155,8 +155,6 @@ namespace api {
m_error_code = Z3_OK;
}
void context::check_searching() {
if (m_searching) {
set_error_code(Z3_INVALID_USAGE, "cannot use function while searching"); // TBD: error code could be fixed.
@ -168,8 +166,8 @@ namespace api {
return const_cast<char *>(m_string_buffer.c_str());
}
char * context::mk_external_string(std::string const & str) {
m_string_buffer = str;
char * context::mk_external_string(std::string && str) {
m_string_buffer = std::move(str);
return const_cast<char *>(m_string_buffer.c_str());
}
@ -466,17 +464,11 @@ extern "C" {
}
}
Z3_API char const * Z3_get_error_msg(Z3_context c, Z3_error_code err) {
LOG_Z3_get_error_msg(c, err);
return _get_error_msg(c, err);
}
Z3_API char const * Z3_get_error_msg_ex(Z3_context c, Z3_error_code err) {
return Z3_get_error_msg(c, err);
}
void Z3_API Z3_set_ast_print_mode(Z3_context c, Z3_ast_print_mode mode) {
Z3_TRY;
LOG_Z3_set_ast_print_mode(c, mode);