Use Variable::valueType() instead of Variable::typeStartToken()

This commit is contained in:
Daniel Marjamäki 2018-06-20 19:08:09 +02:00
parent 10fc070f44
commit 439d4a4900
1 changed files with 1 additions and 1 deletions

View File

@ -1097,7 +1097,7 @@ void CheckOther::checkVariableScope()
const SymbolDatabase *symbolDatabase = mTokenizer->getSymbolDatabase();
for (const Variable* var : symbolDatabase->variableList()) {
if (!var || !var->isLocal() || (!var->isPointer() && !var->typeStartToken()->isStandardType()))
if (!var || !var->isLocal() || (!var->isPointer() && var->valueType()->type <= ValueType::Type::RECORD))
continue;
if (var->isConst())