3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +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

@ -273,7 +273,7 @@ namespace sat {
std::string cut::table2string(unsigned num_input, uint64_t table) {
std::ostringstream strm;
display_table(strm, num_input, table);
return strm.str();
return std::move(strm).str();
}

View file

@ -2280,7 +2280,7 @@ namespace sat {
<< std::setw(4) << m_stats.m_restart
<< mk_stat(*this)
<< " " << std::setw(6) << std::setprecision(2) << m_stopwatch.get_current_seconds() << ")\n";
std::string str(strm.str());
std::string str = std::move(strm).str();
svector<size_t> nums;
for (size_t i = 0; i < str.size(); ++i) {
while (i < str.size() && str[i] != ' ') ++i;