mirror of
https://github.com/Z3Prover/z3
synced 2025-11-01 03:57:51 +00:00
remove a bunch of string copies in the API
thanks to C++20
This commit is contained in:
parent
a4ece21461
commit
1720addc4e
5 changed files with 8 additions and 14 deletions
|
|
@ -116,7 +116,7 @@ extern "C" {
|
|||
RESET_ERROR_CODE();
|
||||
std::ostringstream buffer;
|
||||
to_params(p)->m_params.display(buffer);
|
||||
return mk_c(c)->mk_external_string(buffer.str());
|
||||
return mk_c(c)->mk_external_string(std::move(buffer).str());
|
||||
Z3_CATCH_RETURN("");
|
||||
}
|
||||
|
||||
|
|
@ -208,7 +208,7 @@ extern "C" {
|
|||
buffer << to_param_descrs_ptr(p)->get_param_name(i);
|
||||
}
|
||||
buffer << ")";
|
||||
return mk_c(c)->mk_external_string(buffer.str());
|
||||
return mk_c(c)->mk_external_string(std::move(buffer).str());
|
||||
Z3_CATCH_RETURN("");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue