From b9742150e6169f74cd91a91e62d533d797da5a9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Sun, 11 Dec 2022 19:59:21 +0100 Subject: [PATCH] Set Opcode underlaying storage to uint8_t --- lib/evmone/instructions_opcodes.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/evmone/instructions_opcodes.hpp b/lib/evmone/instructions_opcodes.hpp index 0846b1e097..efedca425e 100644 --- a/lib/evmone/instructions_opcodes.hpp +++ b/lib/evmone/instructions_opcodes.hpp @@ -4,12 +4,14 @@ #pragma once -/// The list of EVM opcodes from every EVM revision. -/// -/// TODO: Change to `enum class Opcode: uint8_t`. namespace evmone { -enum Opcode + +/// The list of EVM opcodes from every EVM revision. +/// +/// This is not enum class because we want implicit conversion to integers, +/// e.g. for usage as an array index. +enum Opcode : uint8_t { OP_STOP = 0x00, OP_ADD = 0x01,