Skip to content

Commit a4ae739

Browse files
method to construct a coverage_goalst object
1 parent 63fa94a commit a4ae739

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/goto-instrument/cover.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ Date: May 2016
88
99
\*******************************************************************/
1010

11-
#include <iostream>
12-
1311
#include <algorithm>
1412
#include <iterator>
1513
#include <unordered_set>
@@ -112,10 +110,11 @@ Function: coverage_goalst::get_coverage
112110
113111
\*******************************************************************/
114112

115-
void coverage_goalst::get_coverage(const std::string &coverage,
113+
coverage_goalst coverage_goalst::get_coverage_goals(const std::string &coverage,
116114
message_handlert &message_handler)
117115
{
118116
jsont json;
117+
coverage_goalst goals;
119118
source_locationt source_location;
120119

121120
//check coverage file
@@ -153,10 +152,11 @@ void coverage_goalst::get_coverage(const std::string &coverage,
153152
//get the line of each existing goal
154153
line_number=(*itg)["sourceLocation"]["line"].value;
155154
source_location.set_line(line_number);
156-
set_goals(source_location);
155+
goals.set_goals(source_location);
157156
}
158157
}
159158
}
159+
return goals;
160160
}
161161

162162
/*******************************************************************\

src/goto-instrument/cover.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Date: May 2016
1616
class coverage_goalst
1717
{
1818
public:
19-
void get_coverage(const std::string &coverage,
20-
message_handlert &message_handler);
19+
static coverage_goalst get_coverage_goals(const std::string &coverage,
20+
message_handlert &message_handler);
2121
void set_goals(source_locationt goal);
2222
bool is_existing_goal(source_locationt source_location);
2323

0 commit comments

Comments
 (0)