File tree 1 file changed +6
-13
lines changed
1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -48,13 +48,9 @@ void cover_goalst::constraint()
48
48
49
49
// cover at least one unknown goal
50
50
51
- for (std::list<goalt>::const_iterator
52
- g_it=goals.begin ();
53
- g_it!=goals.end ();
54
- g_it++)
55
- if (g_it->status ==goalt::statust::UNKNOWN &&
56
- !g_it->condition .is_false ())
57
- disjuncts.push_back (literal_exprt (g_it->condition ));
51
+ for (const auto &g : goals)
52
+ if (g.status == goalt::statust::UNKNOWN && !g.condition .is_false ())
53
+ disjuncts.push_back (literal_exprt (g.condition ));
58
54
59
55
// this is 'false' if there are no disjuncts
60
56
prop_conv.set_to_true (disjunction (disjuncts));
@@ -63,12 +59,9 @@ void cover_goalst::constraint()
63
59
// / Build clause
64
60
void cover_goalst::freeze_goal_variables ()
65
61
{
66
- for (std::list<goalt>::const_iterator
67
- g_it=goals.begin ();
68
- g_it!=goals.end ();
69
- g_it++)
70
- if (!g_it->condition .is_constant ())
71
- prop_conv.set_frozen (g_it->condition );
62
+ for (const auto &g : goals)
63
+ if (!g.condition .is_constant ())
64
+ prop_conv.set_frozen (g.condition );
72
65
}
73
66
74
67
// / Try to cover all goals
You can’t perform that action at this time.
0 commit comments