Skip to content

Commit 0affd00

Browse files
Use ranged-for instead of iterators
1 parent 57bae7b commit 0affd00

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/goto-symex/goto_symex_state.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -473,19 +473,17 @@ bool goto_symex_statet::l2_thread_read_encoding(
473473
const auto a_s_writes = written_in_atomic_section.find(ssa_l1);
474474
if(a_s_writes!=written_in_atomic_section.end())
475475
{
476-
for(a_s_w_entryt::const_iterator it=a_s_writes->second.begin();
477-
it!=a_s_writes->second.end();
478-
++it)
476+
for(const auto &guard_in_list : a_s_writes->second)
479477
{
480-
guardt g=*it;
478+
guardt g = guard_in_list;
481479
g-=guard;
482480
if(g.is_true())
483481
// there has already been a write to l1_identifier within
484482
// this atomic section under the same guard, or a guard
485483
// that implies the current one
486484
return false;
487485

488-
write_guard|=*it;
486+
write_guard |= guard_in_list;
489487
}
490488
}
491489

0 commit comments

Comments
 (0)