@@ -445,7 +445,7 @@ void SymbolDatabase::createSymbolDatabaseFindAllScopes()
445
445
scope->definedTypesMap[new_type->name()] = new_type;
446
446
}
447
447
448
- scope->addVariable(varNameTok, tok, tok, access[scope], new_scope->definedType, scope, mTokenizer.getSettings() );
448
+ scope->addVariable(varNameTok, tok, tok, access[scope], new_scope->definedType, scope);
449
449
450
450
const Token *tok2 = tok->next();
451
451
@@ -4785,12 +4785,12 @@ AccessControl Scope::defaultAccess() const
4785
4785
}
4786
4786
4787
4787
void Scope::addVariable(const Token *token_, const Token *start_, const Token *end_,
4788
- AccessControl access_, const Type *type_, const Scope *scope_, const Settings& settings )
4788
+ AccessControl access_, const Type *type_, const Scope *scope_)
4789
4789
{
4790
4790
// keep possible size_t -> int truncation outside emplace_back() to have a single line
4791
4791
// C4267 VC++ warning instead of several dozens lines
4792
4792
const int varIndex = varlist.size();
4793
- varlist.emplace_back(token_, start_, end_, varIndex, access_, type_, scope_, settings );
4793
+ varlist.emplace_back(token_, start_, end_, varIndex, access_, type_, scope_, scope_->symdb->mTokenizer.getSettings() );
4794
4794
}
4795
4795
4796
4796
// Get variable list..
@@ -4952,7 +4952,7 @@ const Token *Scope::checkVariable(const Token *tok, AccessControl varaccess, con
4952
4952
const Token *typeend = Token::findsimplematch(typestart, "[")->previous();
4953
4953
for (tok = typeend->tokAt(2); Token::Match(tok, "%name%|,"); tok = tok->next()) {
4954
4954
if (tok->varId())
4955
- addVariable(tok, typestart, typeend, varaccess, nullptr, this, settings );
4955
+ addVariable(tok, typestart, typeend, varaccess, nullptr, this);
4956
4956
}
4957
4957
return typeend->linkAt(1);
4958
4958
}
@@ -4989,7 +4989,7 @@ const Token *Scope::checkVariable(const Token *tok, AccessControl varaccess, con
4989
4989
if (Token::Match(typestart, "enum|struct"))
4990
4990
typestart = typestart->next();
4991
4991
4992
- addVariable(vartok, typestart, vartok->previous(), varaccess, vType, this, settings );
4992
+ addVariable(vartok, typestart, vartok->previous(), varaccess, vType, this);
4993
4993
}
4994
4994
4995
4995
return tok;
0 commit comments