Skip to content

Commit 490439d

Browse files
committed
fp-removal: drop unused set
The compute_called_functions method maintains two sets, 'done' and 'functions'. The set 'done' is only used to determine whether an element can be skipped. Since the content of the two sets is the same, the set 'done' can be dropped, and 'functions' can be used instead. Hence, this commit drops the set 'done'.
1 parent f55bd96 commit 490439d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/goto-programs/compute_called_functions.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ std::set<irep_idt> compute_called_functions(
8080
const goto_functionst &goto_functions)
8181
{
8282
std::set<irep_idt> working_queue;
83-
std::set<irep_idt> done;
8483
std::set<irep_idt> functions;
8584

8685
// start from entry point
@@ -91,11 +90,10 @@ std::set<irep_idt> compute_called_functions(
9190
irep_idt id=*working_queue.begin();
9291
working_queue.erase(working_queue.begin());
9392

94-
if(done.find(id)!=done.end())
93+
if(functions.find(id)!=functions.end())
9594
continue;
9695

9796
functions.insert(id);
98-
done.insert(id);
9997

10098
const goto_functionst::function_mapt::const_iterator f_it=
10199
goto_functions.function_map.find(id);

0 commit comments

Comments
 (0)