Uninitialized variable: Refactoring. Use Token::variable() instead of symboldatabase lookup. Ticket: #4535
This commit is contained in:
parent
89560564ed
commit
9124847211
|
@ -401,7 +401,7 @@ private:
|
|||
const Token *parse(const Token &tok, std::list<ExecutionPath *> &checks) const {
|
||||
// Variable declaration..
|
||||
if (tok.varId() && Token::Match(&tok, "%var% [[;]")) {
|
||||
const Variable* var2 = symbolDatabase->getVariableFromVarId(tok.varId());
|
||||
const Variable* var2 = tok.variable();
|
||||
if (var2 && var2->nameToken() == &tok && !var2->isStatic() && !var2->isExtern() && !var2->isConst()) {
|
||||
if (tok.linkAt(1)) { // array
|
||||
const Token* endtok = tok.next();
|
||||
|
|
Loading…
Reference in New Issue