fixed `functionConst` selfcheck warnings (#4846)

This commit is contained in:
Oliver Stöneberg 2023-03-03 11:02:51 +01:00 committed by GitHub
parent b70e1d5461
commit f9c67ef907
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -267,7 +267,7 @@ struct ForwardTraversal {
return result; return result;
} }
Analyzer::Action analyzeRange(const Token* start, const Token* end) { Analyzer::Action analyzeRange(const Token* start, const Token* end) const {
Analyzer::Action result = Analyzer::Action::None; Analyzer::Action result = Analyzer::Action::None;
for (const Token* tok = start; tok && tok != end; tok = tok->next()) { for (const Token* tok = start; tok && tok != end; tok = tok->next()) {
Analyzer::Action action = analyzer->analyze(tok, Analyzer::Direction::Forward); Analyzer::Action action = analyzer->analyze(tok, Analyzer::Direction::Forward);
@ -338,22 +338,22 @@ struct ForwardTraversal {
Inconclusive, Inconclusive,
}; };
Analyzer::Action analyzeScope(const Token* endBlock) { Analyzer::Action analyzeScope(const Token* endBlock) const {
return analyzeRange(endBlock->link(), endBlock); return analyzeRange(endBlock->link(), endBlock);
} }
Analyzer::Action checkScope(Token* endBlock) { Analyzer::Action checkScope(Token* endBlock) const {
Analyzer::Action a = analyzeScope(endBlock); Analyzer::Action a = analyzeScope(endBlock);
tryForkUpdateScope(endBlock, a.isModified()); tryForkUpdateScope(endBlock, a.isModified());
return a; return a;
} }
Analyzer::Action checkScope(const Token* endBlock) { Analyzer::Action checkScope(const Token* endBlock) const {
Analyzer::Action a = analyzeScope(endBlock); Analyzer::Action a = analyzeScope(endBlock);
return a; return a;
} }
bool checkBranch(Branch& branch) { bool checkBranch(Branch& branch) const {
Analyzer::Action a = analyzeScope(branch.endBlock); Analyzer::Action a = analyzeScope(branch.endBlock);
branch.action = a; branch.action = a;
std::vector<ForwardTraversal> ft1 = tryForkUpdateScope(branch.endBlock, a.isModified()); std::vector<ForwardTraversal> ft1 = tryForkUpdateScope(branch.endBlock, a.isModified());

View File

@ -131,7 +131,7 @@ struct ReverseTraversal {
return result; return result;
} }
Analyzer::Action analyzeRange(const Token* start, const Token* end) { Analyzer::Action analyzeRange(const Token* start, const Token* end) const {
Analyzer::Action result = Analyzer::Action::None; Analyzer::Action result = Analyzer::Action::None;
for (const Token* tok = start; tok && tok != end; tok = tok->next()) { for (const Token* tok = start; tok && tok != end; tok = tok->next()) {
Analyzer::Action action = analyzer->analyze(tok, Analyzer::Direction::Reverse); Analyzer::Action action = analyzer->analyze(tok, Analyzer::Direction::Reverse);