Refactorization: Fixed VS warning about variable shadowing.
This commit is contained in:
parent
be36539ad7
commit
72bc6d1f33
|
@ -2524,8 +2524,7 @@ static void setVarIdStructMembers(Token **tok1,
|
||||||
void Tokenizer::setVarIdClassDeclaration(Token * const startToken,
|
void Tokenizer::setVarIdClassDeclaration(Token * const startToken,
|
||||||
const std::map<std::string, unsigned int> &variableId,
|
const std::map<std::string, unsigned int> &variableId,
|
||||||
const unsigned int scopeStartVarId,
|
const unsigned int scopeStartVarId,
|
||||||
std::map<unsigned int, std::map<std::string,unsigned int> >& structMembers,
|
std::map<unsigned int, std::map<std::string,unsigned int> >& structMembers)
|
||||||
unsigned int *_varId)
|
|
||||||
{
|
{
|
||||||
// end of scope
|
// end of scope
|
||||||
const Token * const endToken = startToken->link();
|
const Token * const endToken = startToken->link();
|
||||||
|
@ -2581,7 +2580,7 @@ void Tokenizer::setVarIdClassDeclaration(Token * const startToken,
|
||||||
const std::map<std::string, unsigned int>::const_iterator it = variableId.find(tok->str());
|
const std::map<std::string, unsigned int>::const_iterator it = variableId.find(tok->str());
|
||||||
if (it != variableId.end()) {
|
if (it != variableId.end()) {
|
||||||
tok->varId(it->second);
|
tok->varId(it->second);
|
||||||
setVarIdStructMembers(&tok, structMembers, _varId);
|
setVarIdStructMembers(&tok, structMembers, &_varId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (indentlevel == 0 && tok->str() == ":" && !initListArgLastToken)
|
} else if (indentlevel == 0 && tok->str() == ":" && !initListArgLastToken)
|
||||||
|
@ -2701,8 +2700,7 @@ void Tokenizer::setVarId()
|
||||||
setVarIdClassDeclaration(tok->link(),
|
setVarIdClassDeclaration(tok->link(),
|
||||||
variableId,
|
variableId,
|
||||||
scopeStack.top().startVarid,
|
scopeStack.top().startVarid,
|
||||||
structMembers,
|
structMembers);
|
||||||
&_varId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scopeInfo.empty()) {
|
if (scopeInfo.empty()) {
|
||||||
|
|
|
@ -719,8 +719,7 @@ private:
|
||||||
void setVarIdClassDeclaration(Token * const startToken,
|
void setVarIdClassDeclaration(Token * const startToken,
|
||||||
const std::map<std::string, unsigned int> &variableId,
|
const std::map<std::string, unsigned int> &variableId,
|
||||||
const unsigned int scopeStartVarId,
|
const unsigned int scopeStartVarId,
|
||||||
std::map<unsigned int, std::map<std::string,unsigned int> >& structMembers,
|
std::map<unsigned int, std::map<std::string,unsigned int> >& structMembers);
|
||||||
unsigned int *_varId);
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue