Skip to content

Commit aa0e2e3

Browse files
committed
fix iterator in freeze_lazy_contraints
Also change for loops Fixes:diffblue#1581
1 parent ab9e585 commit aa0e2e3

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/solvers/refinement/refine_arrays.cpp

+4-7
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,13 @@ void bv_refinementt::freeze_lazy_constraints()
121121
if(!lazy_arrays)
122122
return;
123123

124-
for(std::list<lazy_constraintt>::iterator
125-
l_it=lazy_array_constraints.begin();
126-
l_it!=lazy_array_constraints.end(); ++l_it)
124+
for(const auto &constraint : lazy_array_constraints)
127125
{
128126
std::set<symbol_exprt> symbols;
129-
find_symbols(l_it->lazy, symbols);
130-
for(std::set<symbol_exprt>::const_iterator it=symbols.begin();
131-
it!=symbols.end(); ++it)
127+
find_symbols(constraint.lazy, symbols);
128+
for(const auto &symbol : symbols)
132129
{
133-
bvt bv=convert_bv(l_it->lazy);
130+
const bvt bv=convert_bv(symbol);
134131
forall_literals(b_it, bv)
135132
if(!b_it->is_constant())
136133
prop.set_frozen(*b_it);

0 commit comments

Comments
 (0)