Skip to content

Commit f527eaa

Browse files
committed
show_loop_ids: use a ranged for
1 parent 01e57b1 commit f527eaa

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/goto-programs/loop_ids.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,16 @@ void show_loop_ids(
100100
{
101101
case ui_message_handlert::uit::PLAIN:
102102
case ui_message_handlert::uit::XML_UI:
103-
forall_goto_functions(it, goto_functions)
104-
show_loop_ids(ui, it->second.body);
103+
for(const auto &f: goto_functions.function_map)
104+
show_loop_ids(ui, f.second.body);
105105
break;
106+
106107
case ui_message_handlert::uit::JSON_UI:
107108
json_objectt json_result;
108109
json_arrayt &loops=json_result["loops"].make_array();
109110

110-
forall_goto_functions(it, goto_functions)
111-
show_loop_ids_json(ui, it->second.body, loops);
111+
for(const auto &f : goto_functions.function_map)
112+
show_loop_ids_json(ui, f.second.body, loops);
112113

113114
std::cout << ",\n" << json_result;
114115
break;

0 commit comments

Comments
 (0)