Skip to content

Commit f12375c

Browse files
committed
valueflow.cpp: changed ValueFlowAnalyzer::tokenlist back to a std::reference_wrapper and made it protected
1 parent 35fc752 commit f12375c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/valueflow.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2339,7 +2339,9 @@ static bool bifurcate(const Token* tok, const std::set<nonneg int>& varids, cons
23392339
}
23402340

23412341
struct ValueFlowAnalyzer : Analyzer {
2342-
const TokenList& tokenlist;
2342+
protected:
2343+
std::reference_wrapper<const TokenList> tokenlist;
2344+
public:
23432345
const Settings* settings;
23442346
ProgramMemoryState pms;
23452347

@@ -2386,7 +2388,7 @@ struct ValueFlowAnalyzer : Analyzer {
23862388
}
23872389

23882390
bool isCPP() const {
2389-
return tokenlist.isCPP();
2391+
return tokenlist.get().isCPP();
23902392
}
23912393

23922394
const Settings* getSettings() const {

0 commit comments

Comments
 (0)