File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 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)
243243
244244 // mark the goto targets
245245 unsigned cnt = 0 ;
246- for (const auto &i : dest.instructions )
246+ for (auto &i : dest.instructions )
247247 if (i.is_goto ())
248248 i.get_target ()->target_number = (++cnt);
249249
Original file line number Diff line number Diff line change @@ -395,7 +395,15 @@ class goto_programt
395395
396396 // / Returns the first (and only) successor for the usual case of a single
397397 // / 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 ()
399407 {
400408 PRECONDITION (targets.size ()==1 );
401409 return targets.front ();
You can’t perform that action at this time.
0 commit comments