From 38de9214a8d2a1d10b0f39873d0927f873af97e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Mon, 20 Dec 2021 07:29:45 +0100 Subject: [PATCH] small CheckStl optimization (#3645) --- lib/checkstl.cpp | 3 +++ lib/checkstl.h | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/checkstl.cpp b/lib/checkstl.cpp index 7c4661aae..46ad2057a 100644 --- a/lib/checkstl.cpp +++ b/lib/checkstl.cpp @@ -2870,6 +2870,9 @@ void CheckStl::localMutexError(const Token* tok) void CheckStl::checkMutexes() { + if (!mSettings->severity.isEnabled(Severity::warning)) + return; + for (const Scope *function : mTokenizer->getSymbolDatabase()->functionScopes) { std::set checkedVars; for (const Token *tok = function->bodyStart; tok != function->bodyEnd; tok = tok->next()) { diff --git a/lib/checkstl.h b/lib/checkstl.h index 4eada4e13..c26c74f2b 100644 --- a/lib/checkstl.h +++ b/lib/checkstl.h @@ -63,7 +63,6 @@ public: checkStl.if_find(); checkStl.checkFindInsert(); checkStl.iterators(); - checkStl.mismatchingContainers(); checkStl.missingComparison(); checkStl.outOfBounds(); checkStl.outOfBoundsIndexExpression();