@@ -185,42 +185,37 @@ template <class bodyT>
185185void goto_functions_templatet<bodyT>::compute_location_numbers()
186186{
187187 unsigned nr=0 ;
188-
189- for (typename function_mapt::iterator
190- it=function_map.begin ();
191- it!=function_map.end ();
192- it++)
193- it->second .body .compute_location_numbers (nr);
188+ for (auto &func : function_map)
189+ {
190+ func.second .body .compute_location_numbers (nr);
191+ }
194192}
195193
196194template <class bodyT >
197195void goto_functions_templatet<bodyT>::compute_incoming_edges()
198196{
199- for (typename function_mapt::iterator
200- it=function_map.begin ();
201- it!=function_map.end ();
202- it++)
203- it->second .body .compute_incoming_edges ();
197+ for (auto &func : function_map)
198+ {
199+ func.second .body .compute_incoming_edges ();
200+ }
204201}
205202
206203template <class bodyT >
207204void goto_functions_templatet<bodyT>::compute_target_numbers()
208205{
209- for (typename function_mapt::iterator
210- it=function_map.begin ();
211- it!=function_map.end ();
212- it++)
213- it->second .body .compute_target_numbers ();
206+ for (auto &func : function_map)
207+ {
208+ func.second .body .compute_target_numbers ();
209+ }
214210}
215211
216212template <class bodyT >
217213void goto_functions_templatet<bodyT>::compute_loop_numbers()
218214{
219- for (typename function_mapt::iterator
220- it=function_map.begin ();
221- it!=function_map.end ();
222- it++)
223- it->second .body .compute_loop_numbers ();
215+ for (auto &func : function_map)
216+ {
217+ func.second .body .compute_loop_numbers ();
218+ }
224219}
225220
226221#endif // CPROVER_GOTO_PROGRAMS_GOTO_FUNCTIONS_TEMPLATE_H
0 commit comments