File tree 2 files changed +9
-6
lines changed 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -104,10 +104,13 @@ class basic_blockst
104
104
105
105
bool coverage_goalst::is_existing_goal (source_locationt source_location)
106
106
{
107
- std::vector<std::string>::iterator it;
108
- it = find (existing_goals.begin (), existing_goals.end (),
109
- source_location.get_line ().c_str ());
110
-
107
+ std::vector<source_locationt>::iterator it = existing_goals.begin ();
108
+ while (it!=existing_goals.end ())
109
+ {
110
+ if (!source_location.get_line ().compare (it->get_line ()))
111
+ break ;
112
+ ++it;
113
+ }
111
114
if (it == existing_goals.end ())
112
115
return true ;
113
116
else
Original file line number Diff line number Diff line change @@ -24,11 +24,11 @@ class coverage_goalst
24
24
public:
25
25
void get_coverage (const std::string &coverage,
26
26
message_handlert &message_handler);
27
- void set_goals (std::string goal);
27
+ void set_goals (source_locationt goal);
28
28
bool is_existing_goal (source_locationt source_location);
29
29
30
30
private:
31
- std::vector<std::string > existing_goals;
31
+ std::vector<source_locationt > existing_goals;
32
32
};
33
33
34
34
enum class coverage_criteriont
You can’t perform that action at this time.
0 commit comments