@@ -54,15 +54,13 @@ void unified_difft::get_diff(
54
54
new_fit->second .body ;
55
55
56
56
get_diff (
57
- function,
58
57
old_goto_program,
59
58
new_goto_program,
60
59
entry->second ,
61
60
dest);
62
61
}
63
62
64
63
void unified_difft::get_diff (
65
- const irep_idt &identifier,
66
64
const goto_programt &old_goto_program,
67
65
const goto_programt &new_goto_program,
68
66
const differencest &differences,
@@ -109,7 +107,6 @@ void unified_difft::output_diff(
109
107
{
110
108
goto_program_difft diff;
111
109
get_diff (
112
- identifier,
113
110
old_goto_program,
114
111
new_goto_program,
115
112
differences,
@@ -387,15 +384,26 @@ void unified_difft::output(std::ostream &os) const
387
384
388
385
for (const std::pair<irep_idt, differencest> &p : differences_map)
389
386
{
390
- goto_functionst::function_mapt::const_iterator f1=
391
- old_goto_functions.function_map .find (p.first );
392
- goto_functionst::function_mapt::const_iterator f2=
393
- new_goto_functions.function_map .find (p.first );
387
+ const irep_idt &function=p.first ;
388
+
389
+ goto_functionst::function_mapt::const_iterator old_fit=
390
+ old_goto_functions.function_map .find (function);
391
+ goto_functionst::function_mapt::const_iterator new_fit=
392
+ new_goto_functions.function_map .find (function);
393
+
394
+ const goto_programt &old_goto_program=
395
+ old_fit==old_goto_functions.function_map .end () ?
396
+ empty :
397
+ old_fit->second .body ;
398
+ const goto_programt &new_goto_program=
399
+ new_fit==new_goto_functions.function_map .end () ?
400
+ empty :
401
+ new_fit->second .body ;
394
402
395
403
output_diff (
396
- p. first ,
397
- f1==old_goto_functions. function_map . end ()?empty:f1-> second . body ,
398
- f2==new_goto_functions. function_map . end ()?empty:f2-> second . body ,
404
+ function ,
405
+ old_goto_program ,
406
+ new_goto_program ,
399
407
p.second ,
400
408
os);
401
409
}
0 commit comments