Loop variable wasn't really used

This commit is contained in:
Dmitry-Me 2015-12-17 12:54:05 +03:00
parent ad17a0d721
commit 6f996142dc
1 changed files with 5 additions and 5 deletions

View File

@ -2590,10 +2590,10 @@ void Function::addArguments(const SymbolDatabase *symbolDatabase, const Scope *s
argType = symbolDatabase->findVariableType(scope, typeTok); argType = symbolDatabase->findVariableType(scope, typeTok);
if (!argType) { if (!argType) {
// look for variable type in any using namespace in this scope or above // look for variable type in any using namespace in this scope or above
const Scope *parent = scope; const Scope *currentScope = scope;
while (parent) { while (currentScope) {
for (std::list<Scope::UsingInfo>::const_iterator ui = scope->usingList.begin(); for (std::list<Scope::UsingInfo>::const_iterator ui = currentScope->usingList.begin();
ui != scope->usingList.end(); ++ui) { ui != currentScope->usingList.end(); ++ui) {
if (ui->scope) { if (ui->scope) {
argType = symbolDatabase->findVariableType(ui->scope, typeTok); argType = symbolDatabase->findVariableType(ui->scope, typeTok);
if (argType) if (argType)
@ -2602,7 +2602,7 @@ void Function::addArguments(const SymbolDatabase *symbolDatabase, const Scope *s
} }
if (argType) if (argType)
break; break;
parent = parent->nestedIn; currentScope = currentScope->nestedIn;
} }
} }
} }