Skip to content

Commit 587b7a7

Browse files
committed
cppcheckexecutor.cpp: fixed useStlAlgorithm selfcheck warning [skip ci]
1 parent 95ba7b3 commit 587b7a7

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

cli/cppcheckexecutor.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -318,15 +318,9 @@ static bool reportUnmatchedSuppressions(const std::list<SuppressionList::Suppres
318318
if (suppressed)
319319
continue;
320320

321-
bool skip = false;
322-
for (const auto& filter : filters)
323-
{
324-
if (matchglob(filter, s.errorId))
325-
{
326-
skip = true;
327-
break;
328-
}
329-
}
321+
const bool skip = std::any_of(filters.cbegin(), filters.cend(), [&s](const std::string& filter) {
322+
return matchglob(filter, s.errorId);
323+
});
330324
if (skip)
331325
continue;
332326

0 commit comments

Comments
 (0)