only run CheckClass::checkConst if style checking is on
This commit is contained in:
parent
35c303943f
commit
fb10396cb3
|
@ -1401,6 +1401,9 @@ void CheckClass::thisSubtraction()
|
|||
|
||||
void CheckClass::checkConst()
|
||||
{
|
||||
if (!_settings->_checkCodingStyle)
|
||||
return;
|
||||
|
||||
for (const Token *tok = _tokenizer->tokens(); tok; tok = tok->next())
|
||||
{
|
||||
if (Token::Match(tok, "class %var% :|{"))
|
||||
|
|
|
@ -66,6 +66,7 @@ public:
|
|||
}
|
||||
}
|
||||
checkClass.virtualDestructor();
|
||||
checkClass.checkConst();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1518,6 +1518,7 @@ private:
|
|||
|
||||
// Check..
|
||||
Settings settings;
|
||||
settings._checkCodingStyle = true;
|
||||
CheckClass checkClass(&tokenizer, &settings, this);
|
||||
checkClass.checkConst();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue