Skip to content

Commit

Permalink
use of static cast
Browse files Browse the repository at this point in the history
  • Loading branch information
jose-rZM committed Feb 4, 2025
1 parent 800db79 commit cc12192
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ template <typename Lexer> Lex::ParseInput<Lexer>::ParseInput() {

template <typename Token>
bool Lex::Add::operator()(Token const& t, std::vector<std::string>& tks) const {
if (t.id() == symbol_table::i_) {
if (static_cast<unsigned long>(t.id()) == symbol_table::i_) {
return true;
}
tks.push_back(symbol_table::token_types_r_.at(t.id()));
tks.push_back(symbol_table::token_types_r_.at(static_cast<unsigned long>(t.id())));
return true;
}

Expand Down

0 comments on commit cc12192

Please sign in to comment.