Skip to content

Commit

Permalink
Merge pull request diffblue#1429 from janmroczkowski/janmroczkowski/u…
Browse files Browse the repository at this point in the history
…nified_difft-remove-unused-identifier

Remove unused identifier
  • Loading branch information
Daniel Kroening authored Sep 29, 2017
2 parents 3ceb89b + f948c2f commit 8151e91
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
28 changes: 18 additions & 10 deletions src/goto-diff/unified_diff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,13 @@ void unified_difft::get_diff(
new_fit->second.body;

get_diff(
function,
old_goto_program,
new_goto_program,
entry->second,
dest);
}

void unified_difft::get_diff(
const irep_idt &identifier,
const goto_programt &old_goto_program,
const goto_programt &new_goto_program,
const differencest &differences,
Expand Down Expand Up @@ -109,7 +107,6 @@ void unified_difft::output_diff(
{
goto_program_difft diff;
get_diff(
identifier,
old_goto_program,
new_goto_program,
differences,
Expand Down Expand Up @@ -387,15 +384,26 @@ void unified_difft::output(std::ostream &os) const

for(const std::pair<irep_idt, differencest> &p : differences_map)
{
goto_functionst::function_mapt::const_iterator f1=
old_goto_functions.function_map.find(p.first);
goto_functionst::function_mapt::const_iterator f2=
new_goto_functions.function_map.find(p.first);
const irep_idt &function=p.first;

goto_functionst::function_mapt::const_iterator old_fit=
old_goto_functions.function_map.find(function);
goto_functionst::function_mapt::const_iterator new_fit=
new_goto_functions.function_map.find(function);

const goto_programt &old_goto_program=
old_fit==old_goto_functions.function_map.end() ?
empty :
old_fit->second.body;
const goto_programt &new_goto_program=
new_fit==new_goto_functions.function_map.end() ?
empty :
new_fit->second.body;

output_diff(
p.first,
f1==old_goto_functions.function_map.end()?empty:f1->second.body,
f2==new_goto_functions.function_map.end()?empty:f2->second.body,
function,
old_goto_program,
new_goto_program,
p.second,
os);
}
Expand Down
1 change: 0 additions & 1 deletion src/goto-diff/unified_diff.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ class unified_difft
differencest &differences) const;

void get_diff(
const irep_idt &identifier,
const goto_programt &old_goto_program,
const goto_programt &new_goto_program,
const differencest &differences,
Expand Down

0 comments on commit 8151e91

Please sign in to comment.