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

remove a few string copies

This commit is contained in:
Nuno Lopes 2023-12-20 16:55:09 +00:00
parent db5a1a7604
commit b2d5c24c1d
18 changed files with 39 additions and 80 deletions

View file

@ -338,12 +338,12 @@ namespace api {
std::ostringstream buffer;
app * a = to_app(n);
buffer << mk_pp(a->get_decl(), m()) << " applied to: ";
if (a->get_num_args() > 1) buffer << "\n";
if (a->get_num_args() > 1) buffer << '\n';
for (unsigned i = 0; i < a->get_num_args(); ++i) {
buffer << mk_bounded_pp(a->get_arg(i), m(), 3) << " of sort ";
buffer << mk_pp(a->get_arg(i)->get_sort(), m()) << "\n";
buffer << mk_pp(a->get_arg(i)->get_sort(), m()) << '\n';
}
auto str = buffer.str();
auto str = std::move(buffer).str();
warning_msg("%s", str.c_str());
break;
}