File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,19 @@ void DefLookup::hashDefect(const Defect &def)
78
78
defList.push_back (def);
79
79
}
80
80
81
+ static bool defLookupCore (TDefList &defList)
82
+ {
83
+ // just remove an arbitrary one
84
+ // TODO: add some other criteria in order to make the match more precise
85
+ unsigned cnt = defList.size ();
86
+ if (cnt)
87
+ defList.resize (cnt - 1 );
88
+ else
89
+ return false ;
90
+
91
+ return true ;
92
+ }
93
+
81
94
bool DefLookup::lookup (const Defect &def)
82
95
{
83
96
// look for defect class
@@ -116,15 +129,11 @@ bool DefLookup::lookup(const Defect &def)
116
129
if (byMsg.end () == itByMsg)
117
130
return false ;
118
131
119
- // FIXME: nasty over-approximation
132
+ // process the resulting list of defects sequentially
120
133
TDefList &defList = itByMsg->second ;
121
- unsigned cnt = defList.size ();
122
- if (cnt)
123
- // just remove an arbitrary one
124
- defList.resize (cnt - 1 );
125
- else
134
+ if (!defLookupCore (defList))
126
135
return false ;
127
136
128
- // TODO: add some other criteria in order to make the match more precise
137
+ // found!
129
138
return true ;
130
139
}
You can’t perform that action at this time.
0 commit comments