@@ -244,17 +244,6 @@ class TestThreadExecutor : public TestFixture {
244244
245245 // TODO: provide data which actually shows values above 0
246246
247- template <typename T>
248- std::size_t find_all_of (const std::string& str, T sub) {
249- std::size_t n = 0 ;
250- std::string::size_type pos = 0 ;
251- while ((pos = str.find (sub, pos)) != std::string::npos) {
252- ++pos;
253- ++n;
254- }
255- return n;
256- }
257-
258247 // TODO: should this be logged only once like summary?
259248 void showtime_top5 () {
260249 REDIRECT;
@@ -263,7 +252,7 @@ class TestThreadExecutor : public TestFixture {
263252 true , SHOWTIME_MODES::SHOWTIME_TOP5);
264253 // for each file: top5 results + overall + empty line
265254 const std::string output_s = GET_REDIRECT_OUTPUT;
266- ASSERT_EQUALS ((5 + 1 + 1 ) * 2 , find_all_of (output_s, ' \n ' ));
255+ ASSERT_EQUALS ((5 + 1 + 1 ) * 2 , cppcheck:: find_all_of (output_s, ' \n ' ));
267256 }
268257
269258 void showtime_file () {
@@ -272,7 +261,7 @@ class TestThreadExecutor : public TestFixture {
272261 " int main() {}" ,
273262 true , SHOWTIME_MODES::SHOWTIME_FILE);
274263 const std::string output_s = GET_REDIRECT_OUTPUT;
275- ASSERT_EQUALS (2 , find_all_of (output_s, " Overall time:" ));
264+ ASSERT_EQUALS (2 , cppcheck:: find_all_of (output_s, " Overall time:" ));
276265 }
277266
278267 void showtime_summary () {
@@ -293,7 +282,7 @@ class TestThreadExecutor : public TestFixture {
293282 true , SHOWTIME_MODES::SHOWTIME_TOP5);
294283 // for each file: top5 results + overall + empty line
295284 const std::string output_s = GET_REDIRECT_OUTPUT;
296- ASSERT_EQUALS ((5 + 1 + 1 ) * 2 , find_all_of (output_s, ' \n ' ));
285+ ASSERT_EQUALS ((5 + 1 + 1 ) * 2 , cppcheck:: find_all_of (output_s, ' \n ' ));
297286 }
298287
299288 void showtime_file_j () {
@@ -302,7 +291,7 @@ class TestThreadExecutor : public TestFixture {
302291 " int main() {}" ,
303292 true , SHOWTIME_MODES::SHOWTIME_FILE);
304293 const std::string output_s = GET_REDIRECT_OUTPUT;
305- ASSERT_EQUALS (2 , find_all_of (output_s, " Overall time:" ));
294+ ASSERT_EQUALS (2 , cppcheck:: find_all_of (output_s, " Overall time:" ));
306295 }
307296
308297 void showtime_summary_j () {
0 commit comments