3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-27 08:28:44 +00:00

remove a bunch of string copies in the API

thanks to C++20
This commit is contained in:
Nuno Lopes 2022-10-26 18:22:55 +01:00
parent a4ece21461
commit 1720addc4e
5 changed files with 8 additions and 14 deletions

View file

@ -318,8 +318,7 @@ extern "C" {
void Z3_API Z3_solver_from_string(Z3_context c, Z3_solver s, Z3_string c_str) {
Z3_TRY;
LOG_Z3_solver_from_string(c, s, c_str);
std::string str(c_str);
std::istringstream is(str);
std::istringstream is(c_str);
if (is_dimacs_string(c_str)) {
solver_from_dimacs_stream(c, s, is);
}