Redundant assignment: check that --enable=style has been used.

This commit is contained in:
Daniel Marjamäki 2018-11-27 13:04:50 +01:00
parent e501b6a460
commit 32c05fef92
1 changed files with 2 additions and 0 deletions

View File

@ -545,6 +545,8 @@ const Token *CheckOther::checkRedundantAssignmentRecursive(const Token *assign1,
void CheckOther::checkRedundantAssignment()
{
if (!mSettings->isEnabled(Settings::STYLE))
return;
const SymbolDatabase* symbolDatabase = mTokenizer->getSymbolDatabase();
for (const Scope *scope : symbolDatabase->functionScopes) {
if (!scope->bodyStart)