Skip to content

Commit 4ac1474

Browse files
committed
Scope: removed unnecessary Settings parameter from getVariableList()
1 parent 842c278 commit 4ac1474

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/symboldatabase.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ void SymbolDatabase::createSymbolDatabaseVariableInfo()
849849
// fill in variable info
850850
for (Scope& scope : scopeList) {
851851
// find variables
852-
scope.getVariableList(mTokenizer.getSettings());
852+
scope.getVariableList();
853853
}
854854

855855
// fill in function arguments
@@ -4815,16 +4815,16 @@ void Scope::addVariable(const Token *token_, const Token *start_, const Token *e
48154815
}
48164816

48174817
// Get variable list..
4818-
void Scope::getVariableList(const Settings& settings)
4818+
void Scope::getVariableList()
48194819
{
48204820
if (!bodyStartList.empty()) {
48214821
for (const Token *bs: bodyStartList)
4822-
getVariableList(settings, bs->next(), bs->link());
4822+
getVariableList(symdb->mTokenizer.getSettings(), bs->next(), bs->link());
48234823
}
48244824

48254825
// global scope
48264826
else if (type == ScopeType::eGlobal)
4827-
getVariableList(settings, symdb->mTokenizer.tokens(), nullptr);
4827+
getVariableList(symdb->mTokenizer.getSettings(), symdb->mTokenizer.tokens(), nullptr);
48284828

48294829
// forward declaration
48304830
else

lib/symboldatabase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,7 @@ class CPPCHECKLIB Scope {
11601160
const Scope *scope_);
11611161

11621162
/** @brief initialize varlist */
1163-
void getVariableList(const Settings& settings);
1163+
void getVariableList();
11641164

11651165
const Function *getDestructor() const;
11661166

0 commit comments

Comments
 (0)