Skip to content

Commit

Permalink
Add missing const
Browse files Browse the repository at this point in the history
  • Loading branch information
pfultz2 committed May 22, 2024
1 parent 9110f10 commit 8364bfe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/forwardanalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ namespace {
return actions.isModified();
}

bool stopOnCondition(const Token* condTok)
bool stopOnCondition(const Token* condTok) const
{
if (analyzer->isConditional() && findAstNode(condTok, [](const Token* tok) {
return tok->isIncompleteVar();
Expand Down Expand Up @@ -203,7 +203,7 @@ namespace {
template<class T, class F, REQUIRES("T must be a Token class", std::is_convertible<T*, const Token*> )>
Progress traverseConditional(T* tok, F f, bool traverseUnknown) {
if (Token::Match(tok, "?|&&|%oror%") && tok->astOperand1() && tok->astOperand2()) {
T* condTok = tok->astOperand1();
const T* condTok = tok->astOperand1();
T* childTok = tok->astOperand2();
bool checkThen, checkElse;
std::tie(checkThen, checkElse) = evalCond(condTok);
Expand Down

0 comments on commit 8364bfe

Please sign in to comment.