@@ -178,8 +178,7 @@ void code_contractst::check_apply_loop_contracts(
178
178
}
179
179
else
180
180
{
181
- for (const auto &target : assigns.operands ())
182
- modifies.insert (target);
181
+ modifies.insert (assigns.operands ().cbegin (), assigns.operands ().cend ());
183
182
184
183
// Create snapshots of write set CARs.
185
184
// This must be done before havocing the write set.
@@ -264,13 +263,8 @@ void code_contractst::check_apply_loop_contracts(
264
263
// Copy the loop_head as we would increment the iterator while instrumenting.
265
264
if (assigns.is_not_nil ())
266
265
{
267
- auto copy_loop_head = loop_head;
268
266
check_frame_conditions (
269
- function_name,
270
- goto_function.body ,
271
- copy_loop_head,
272
- loop_end,
273
- loop_assigns);
267
+ function_name, goto_function.body , loop_head, loop_end, loop_assigns);
274
268
}
275
269
276
270
// Generate: assignments to store the multidimensional decreases clause's
@@ -649,8 +643,7 @@ bool code_contractst::apply_function_contract(
649
643
650
644
// Havoc all targets in the write set
651
645
modifiest modifies;
652
- for (const auto &target : targets.operands ())
653
- modifies.insert (target);
646
+ modifies.insert (targets.operands ().cbegin (), targets.operands ().cend ());
654
647
655
648
goto_programt assigns_havoc;
656
649
havoc_assigns_targetst havoc_gen (modifies, ns);
@@ -1000,7 +993,7 @@ bool code_contractst::check_frame_conditions_function(const irep_idt &function)
1000
993
void code_contractst::check_frame_conditions (
1001
994
const irep_idt &function,
1002
995
goto_programt &body,
1003
- goto_programt::targett & instruction_it,
996
+ goto_programt::targett instruction_it,
1004
997
const goto_programt::targett &instruction_end,
1005
998
assigns_clauset &assigns)
1006
999
{
0 commit comments