File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -276,21 +276,14 @@ void goto_checkt::invalidate(const exprt &lhs)
276
276
else if (lhs.id ()==ID_symbol)
277
277
{
278
278
// clear all assertions about 'symbol'
279
- find_symbols_sett find_symbols_set;
280
- find_symbols_set.insert (to_symbol_expr (lhs).get_identifier ());
279
+ find_symbols_sett find_symbols_set{to_symbol_expr (lhs).get_identifier ()};
281
280
282
- for (assertionst::iterator
283
- it=assertions.begin ();
284
- it!=assertions.end ();
285
- ) // no it++
281
+ for (auto it = assertions.begin (); it != assertions.end ();)
286
282
{
287
- assertionst::iterator next=it;
288
- next++;
289
-
290
283
if (has_symbol (*it, find_symbols_set) || has_subexpr (*it, ID_dereference))
291
- assertions.erase (it);
292
-
293
- it=next ;
284
+ it = assertions.erase (it);
285
+ else
286
+ ++it ;
294
287
}
295
288
}
296
289
else
You can’t perform that action at this time.
0 commit comments