diff --git a/lib/forwardanalyzer.cpp b/lib/forwardanalyzer.cpp index 3a2c32075..9e6f3a016 100644 --- a/lib/forwardanalyzer.cpp +++ b/lib/forwardanalyzer.cpp @@ -267,7 +267,7 @@ struct ForwardTraversal { 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; for (const Token* tok = start; tok && tok != end; tok = tok->next()) { Analyzer::Action action = analyzer->analyze(tok, Analyzer::Direction::Forward); @@ -338,22 +338,22 @@ struct ForwardTraversal { Inconclusive, }; - Analyzer::Action analyzeScope(const Token* endBlock) { + Analyzer::Action analyzeScope(const Token* endBlock) const { return analyzeRange(endBlock->link(), endBlock); } - Analyzer::Action checkScope(Token* endBlock) { + Analyzer::Action checkScope(Token* endBlock) const { Analyzer::Action a = analyzeScope(endBlock); tryForkUpdateScope(endBlock, a.isModified()); return a; } - Analyzer::Action checkScope(const Token* endBlock) { + Analyzer::Action checkScope(const Token* endBlock) const { Analyzer::Action a = analyzeScope(endBlock); return a; } - bool checkBranch(Branch& branch) { + bool checkBranch(Branch& branch) const { Analyzer::Action a = analyzeScope(branch.endBlock); branch.action = a; std::vector ft1 = tryForkUpdateScope(branch.endBlock, a.isModified()); diff --git a/lib/reverseanalyzer.cpp b/lib/reverseanalyzer.cpp index bb674e621..f54ea02f5 100644 --- a/lib/reverseanalyzer.cpp +++ b/lib/reverseanalyzer.cpp @@ -131,7 +131,7 @@ struct ReverseTraversal { 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; for (const Token* tok = start; tok && tok != end; tok = tok->next()) { Analyzer::Action action = analyzer->analyze(tok, Analyzer::Direction::Reverse);