From 6f996142dc60d10c22f1342ddea35b577756615f Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Thu, 17 Dec 2015 12:54:05 +0300 Subject: [PATCH] Loop variable wasn't really used --- lib/symboldatabase.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 91cde45a7..a64d60c43 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -2590,10 +2590,10 @@ void Function::addArguments(const SymbolDatabase *symbolDatabase, const Scope *s argType = symbolDatabase->findVariableType(scope, typeTok); if (!argType) { // look for variable type in any using namespace in this scope or above - const Scope *parent = scope; - while (parent) { - for (std::list::const_iterator ui = scope->usingList.begin(); - ui != scope->usingList.end(); ++ui) { + const Scope *currentScope = scope; + while (currentScope) { + for (std::list::const_iterator ui = currentScope->usingList.begin(); + ui != currentScope->usingList.end(); ++ui) { if (ui->scope) { argType = symbolDatabase->findVariableType(ui->scope, typeTok); if (argType) @@ -2602,7 +2602,7 @@ void Function::addArguments(const SymbolDatabase *symbolDatabase, const Scope *s } if (argType) break; - parent = parent->nestedIn; + currentScope = currentScope->nestedIn; } } }