mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
Merge pull request #1859 from waywardmonkeys/for-range-copy
Avoid unnecessary copies in for-range loops.
This commit is contained in:
commit
c84182b42a
4 changed files with 14 additions and 14 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue