@@ -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,11 +263,10 @@ 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
267
function_name,
270
268
goto_function.body ,
271
- copy_loop_head ,
269
+ loop_head ,
272
270
loop_end,
273
271
loop_assigns);
274
272
}
@@ -649,8 +647,7 @@ bool code_contractst::apply_function_contract(
649
647
650
648
// Havoc all targets in the write set
651
649
modifiest modifies;
652
- for (const auto &target : targets.operands ())
653
- modifies.insert (target);
650
+ modifies.insert (targets.operands ().cbegin (), targets.operands ().cend ());
654
651
655
652
goto_programt assigns_havoc;
656
653
havoc_assigns_targetst havoc_gen (modifies, ns);
@@ -1000,7 +997,7 @@ bool code_contractst::check_frame_conditions_function(const irep_idt &function)
1000
997
void code_contractst::check_frame_conditions (
1001
998
const irep_idt &function,
1002
999
goto_programt &body,
1003
- goto_programt::targett & instruction_it,
1000
+ goto_programt::targett instruction_it,
1004
1001
const goto_programt::targett &instruction_end,
1005
1002
assigns_clauset &assigns)
1006
1003
{
0 commit comments