don't print style message if --enable=style is not specified.

message was of type:
(style) Redundant checking of STL container element existence before removing it.
This commit is contained in:
Matthias Krüger 2015-04-06 14:10:27 +02:00
parent 988acf11b4
commit 22d97fdbd6
1 changed files with 3 additions and 0 deletions

View File

@ -918,6 +918,9 @@ void CheckStl::sizeError(const Token *tok)
void CheckStl::redundantCondition()
{
if (!_settings->isEnabled("style"))
return;
const SymbolDatabase *symbolDatabase = _tokenizer->getSymbolDatabase();
for (std::list<Scope>::const_iterator i = symbolDatabase->scopeList.begin(); i != symbolDatabase->scopeList.end(); ++i) {