From 72bc6d1f337b50561999a2ea06ed23b0fcb3b710 Mon Sep 17 00:00:00 2001 From: PKEuS Date: Fri, 6 Nov 2015 17:35:08 +0100 Subject: [PATCH] Refactorization: Fixed VS warning about variable shadowing. --- lib/tokenize.cpp | 8 +++----- lib/tokenize.h | 3 +-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index aeb84660f..7cddb8e94 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -2524,8 +2524,7 @@ static void setVarIdStructMembers(Token **tok1, void Tokenizer::setVarIdClassDeclaration(Token * const startToken, const std::map &variableId, const unsigned int scopeStartVarId, - std::map >& structMembers, - unsigned int *_varId) + std::map >& structMembers) { // end of scope const Token * const endToken = startToken->link(); @@ -2581,7 +2580,7 @@ void Tokenizer::setVarIdClassDeclaration(Token * const startToken, const std::map::const_iterator it = variableId.find(tok->str()); if (it != variableId.end()) { tok->varId(it->second); - setVarIdStructMembers(&tok, structMembers, _varId); + setVarIdStructMembers(&tok, structMembers, &_varId); } } } else if (indentlevel == 0 && tok->str() == ":" && !initListArgLastToken) @@ -2701,8 +2700,7 @@ void Tokenizer::setVarId() setVarIdClassDeclaration(tok->link(), variableId, scopeStack.top().startVarid, - structMembers, - &_varId); + structMembers); } if (scopeInfo.empty()) { diff --git a/lib/tokenize.h b/lib/tokenize.h index b7e166129..c5c092e51 100644 --- a/lib/tokenize.h +++ b/lib/tokenize.h @@ -719,8 +719,7 @@ private: void setVarIdClassDeclaration(Token * const startToken, const std::map &variableId, const unsigned int scopeStartVarId, - std::map >& structMembers, - unsigned int *_varId); + std::map >& structMembers); public: