Skip to content

Commit 6938faa

Browse files
committed
Refactor loop over with_exprt operands into for loop
1 parent f0de1c7 commit 6938faa

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/solvers/smt2_incremental/convert_expr_to_smt.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,13 +1007,10 @@ static smt_termt convert_array_update_to_smt(
10071007
const sub_expression_mapt &converted)
10081008
{
10091009
smt_termt array = converted.at(with.old());
1010-
auto it = ++with.operands().begin();
1011-
while(it != with.operands().end())
1010+
for(auto it = ++with.operands().begin(); it != with.operands().end(); it += 2)
10121011
{
1013-
const smt_termt &index_term = converted.at(*it);
1014-
++it;
1015-
const smt_termt &value_term = converted.at(*it);
1016-
++it;
1012+
const smt_termt &index_term = converted.at(it[0]);
1013+
const smt_termt &value_term = converted.at(it[1]);
10171014
array = smt_array_theoryt::store(array, index_term, value_term);
10181015
}
10191016
return array;

0 commit comments

Comments
 (0)