Skip to content

Commit

Permalink
Update tools/include/eosio/gen.hpp
Browse files Browse the repository at this point in the history
Add braces

Co-authored-by: Scott B <[email protected]>
  • Loading branch information
nathanielhourt and ScottBailey committed Mar 20, 2023
1 parent 92fae51 commit 0b0c1c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/include/eosio/gen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,9 @@ struct generation_utils {
if (auto ce = llvm::dyn_cast<clang::CastExpr>(std::get<clang::Expr*>(arg))) {
auto il = llvm::dyn_cast<clang::IntegerLiteral>(ce->getSubExpr());
return std::to_string(il->getValue().getLimitedValue());
} else if (auto ce = llvm::dyn_cast<clang::ConstantExpr>(std::get<clang::Expr*>(arg)))
} else if (auto ce = llvm::dyn_cast<clang::ConstantExpr>(std::get<clang::Expr*>(arg))) {
return ce->getResultAsAPSInt().toString(10);
}
} else {
return std::get<llvm::APSInt>(arg).toString(10);
}
Expand Down

0 comments on commit 0b0c1c6

Please sign in to comment.