small CheckStl optimization (#3645)
This commit is contained in:
parent
73f24b43f9
commit
38de9214a8
|
@ -2870,6 +2870,9 @@ void CheckStl::localMutexError(const Token* tok)
|
||||||
|
|
||||||
void CheckStl::checkMutexes()
|
void CheckStl::checkMutexes()
|
||||||
{
|
{
|
||||||
|
if (!mSettings->severity.isEnabled(Severity::warning))
|
||||||
|
return;
|
||||||
|
|
||||||
for (const Scope *function : mTokenizer->getSymbolDatabase()->functionScopes) {
|
for (const Scope *function : mTokenizer->getSymbolDatabase()->functionScopes) {
|
||||||
std::set<nonneg int> checkedVars;
|
std::set<nonneg int> checkedVars;
|
||||||
for (const Token *tok = function->bodyStart; tok != function->bodyEnd; tok = tok->next()) {
|
for (const Token *tok = function->bodyStart; tok != function->bodyEnd; tok = tok->next()) {
|
||||||
|
|
|
@ -63,7 +63,6 @@ public:
|
||||||
checkStl.if_find();
|
checkStl.if_find();
|
||||||
checkStl.checkFindInsert();
|
checkStl.checkFindInsert();
|
||||||
checkStl.iterators();
|
checkStl.iterators();
|
||||||
checkStl.mismatchingContainers();
|
|
||||||
checkStl.missingComparison();
|
checkStl.missingComparison();
|
||||||
checkStl.outOfBounds();
|
checkStl.outOfBounds();
|
||||||
checkStl.outOfBoundsIndexExpression();
|
checkStl.outOfBoundsIndexExpression();
|
||||||
|
|
Loading…
Reference in New Issue