diff options
-rw-r--r-- | src/ir/find_all.h | 2 | ||||
-rw-r--r-- | src/wasm.h | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/ir/find_all.h b/src/ir/find_all.h index 77edafe89..708517124 100644 --- a/src/ir/find_all.h +++ b/src/ir/find_all.h @@ -64,7 +64,7 @@ template<typename T> struct FindAllPointers { // take \ast by reference. FindAllPointers(Expression*& ast) { PointerFinder finder; - finder.id = (Expression::Id)T::SpecificId; + finder.id = T::SpecificId; finder.list = &list; finder.walk(ast); } diff --git a/src/wasm.h b/src/wasm.h index 4901723fd..85473b1f9 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -647,7 +647,7 @@ enum StringEqOp { class Expression { public: - enum Id { + enum Id : uint8_t { InvalidId = 0, BlockId, IfId, @@ -805,9 +805,8 @@ using ExpressionList = ArenaVector<Expression*>; template<Expression::Id SID> class SpecificExpression : public Expression { public: - enum { - SpecificId = SID // compile-time access to the type for the class - }; + // Compile-time access to the type for the class. + static constexpr Id SpecificId = SID; SpecificExpression() : Expression(SID) {} }; |