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:
parent
988acf11b4
commit
22d97fdbd6
|
@ -918,6 +918,9 @@ void CheckStl::sizeError(const Token *tok)
|
||||||
|
|
||||||
void CheckStl::redundantCondition()
|
void CheckStl::redundantCondition()
|
||||||
{
|
{
|
||||||
|
if (!_settings->isEnabled("style"))
|
||||||
|
return;
|
||||||
|
|
||||||
const SymbolDatabase *symbolDatabase = _tokenizer->getSymbolDatabase();
|
const SymbolDatabase *symbolDatabase = _tokenizer->getSymbolDatabase();
|
||||||
|
|
||||||
for (std::list<Scope>::const_iterator i = symbolDatabase->scopeList.begin(); i != symbolDatabase->scopeList.end(); ++i) {
|
for (std::list<Scope>::const_iterator i = symbolDatabase->scopeList.begin(); i != symbolDatabase->scopeList.end(); ++i) {
|
||||||
|
|
Loading…
Reference in New Issue