3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +00:00

Avoid unnecessary copies in for-range loops.

This commit is contained in:
Bruce Mitchener 2018-10-02 10:38:41 +07:00
parent b0dac346dc
commit 7bc283b84e
4 changed files with 14 additions and 14 deletions

View file

@ -1375,8 +1375,8 @@ bool theory_seq::branch_variable_mb() {
continue;
}
rational l1, l2;
for (auto elem : len1) l1 += elem;
for (auto elem : len2) l2 += elem;
for (const auto& elem : len1) l1 += elem;
for (const auto& elem : len2) l2 += elem;
if (l1 != l2) {
TRACE("seq", tout << "lengths are not compatible\n";);
expr_ref l = mk_concat(e.ls());