Skip to content

Commit

Permalink
Fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
pfultz2 committed Nov 25, 2023
1 parent 92c8083 commit abfd8aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/programmemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
#include <utility>
#include <vector>



ExprIdToken::ExprIdToken(const Token* tok)
: tok(tok), exprid(tok ? tok->exprId() : 0) {}

nonneg int ExprIdToken::getExpressionId() const {
return tok ? tok->exprId() : exprid;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/programmemory.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct ExprIdToken {
ExprIdToken() = default;
// cppcheck-suppress noExplicitConstructor
// NOLINTNEXTLINE(google-explicit-constructor)
ExprIdToken(const Token* tok) : tok(tok), exprid(tok ? tok->exprId() : 0) {}
ExprIdToken(const Token* tok);
// TODO: Make this constructor only available from ProgramMemory
// cppcheck-suppress noExplicitConstructor
// NOLINTNEXTLINE(google-explicit-constructor)
Expand Down

0 comments on commit abfd8aa

Please sign in to comment.