@@ -52,32 +52,27 @@ void show_goto_functions(
52
52
break ;
53
53
54
54
case ui_message_handlert::uit::PLAIN:
55
- if (list_only)
56
55
{
57
56
for (const auto &fun : goto_functions.function_map )
58
57
{
59
58
const symbolt &symbol = ns.lookup (fun.first );
60
- msg.status () << ' \n '
61
- << symbol.display_name () << " /* " << symbol.name
62
- << (fun.second .body_available () ? " "
63
- : " , body not available" )
64
- << " */" ;
65
- msg.status () << messaget::eom;
66
- }
67
- }
68
- else
69
- {
70
- auto &out = msg.status ();
71
- for (const auto &fun : goto_functions.function_map )
72
- {
73
- if (fun.second .body_available ())
59
+ const bool has_body = fun.second .body_available ();
60
+
61
+ if (list_only)
62
+ {
63
+ msg.status () << ' \n '
64
+ << symbol.display_name () << " /* " << symbol.name
65
+ << (has_body ? " " : " , body not available" ) << " */" ;
66
+ msg.status () << messaget::eom;
67
+ }
68
+ else if (has_body)
74
69
{
75
- out << " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n " ;
70
+ msg. status () << " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n " ;
76
71
77
72
const symbolt &symbol = ns.lookup (fun.first );
78
- out << messaget::bold << symbol.display_name () << messaget::reset
79
- << " /* " << symbol.name << " */\n " ;
80
- fun.second .body .output (ns, symbol.name , out );
73
+ msg. status () << messaget::bold << symbol.display_name ()
74
+ << messaget::reset << " /* " << symbol.name << " */\n " ;
75
+ fun.second .body .output (ns, symbol.name , msg. status () );
81
76
msg.status () << messaget::eom;
82
77
}
83
78
}
0 commit comments