File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ void goto_convertt::optimize_guarded_gotos(goto_programt &dest)
243
243
244
244
// mark the goto targets
245
245
unsigned cnt = 0 ;
246
- for (const auto &i : dest.instructions )
246
+ for (auto &i : dest.instructions )
247
247
if (i.is_goto ())
248
248
i.get_target ()->target_number = (++cnt);
249
249
Original file line number Diff line number Diff line change @@ -395,7 +395,15 @@ class goto_programt
395
395
396
396
// / Returns the first (and only) successor for the usual case of a single
397
397
// / target
398
- targett get_target () const
398
+ const_targett get_target () const
399
+ {
400
+ PRECONDITION (targets.size () == 1 );
401
+ return targets.front ();
402
+ }
403
+
404
+ // / Returns the first (and only) successor for the usual case of a single
405
+ // / target
406
+ targett get_target ()
399
407
{
400
408
PRECONDITION (targets.size ()==1 );
401
409
return targets.front ();
You can’t perform that action at this time.
0 commit comments