Skip to content

Commit 4b1a7da

Browse files
committed
Scope: removed unnecessary Settings parameter from getVariableList()
1 parent 1812c8a commit 4b1a7da

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/symboldatabase.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ void SymbolDatabase::createSymbolDatabaseVariableInfo()
845845
// fill in variable info
846846
for (Scope& scope : scopeList) {
847847
// find variables
848-
scope.getVariableList(mTokenizer.getSettings());
848+
scope.getVariableList();
849849
}
850850

851851
// fill in function arguments
@@ -4794,16 +4794,16 @@ void Scope::addVariable(const Token *token_, const Token *start_, const Token *e
47944794
}
47954795

47964796
// Get variable list..
4797-
void Scope::getVariableList(const Settings& settings)
4797+
void Scope::getVariableList()
47984798
{
47994799
if (!bodyStartList.empty()) {
48004800
for (const Token *bs: bodyStartList)
4801-
getVariableList(settings, bs->next(), bs->link());
4801+
getVariableList(symdb->mTokenizer.getSettings(), bs->next(), bs->link());
48024802
}
48034803

48044804
// global scope
48054805
else if (type == Scope::eGlobal)
4806-
getVariableList(settings, symdb->mTokenizer.tokens(), nullptr);
4806+
getVariableList(symdb->mTokenizer.getSettings(), symdb->mTokenizer.tokens(), nullptr);
48074807

48084808
// forward declaration
48094809
else

lib/symboldatabase.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,7 @@ class CPPCHECKLIB Scope {
11521152
const Scope *scope_);
11531153

11541154
/** @brief initialize varlist */
1155-
void getVariableList(const Settings& settings);
1155+
void getVariableList();
11561156

11571157
const Function *getDestructor() const;
11581158

0 commit comments

Comments
 (0)