diff options
author | Yoichi Hirai <i@yoichihirai.com> | 2017-01-13 20:19:14 +0800 |
---|---|---|
committer | Yoichi Hirai <i@yoichihirai.com> | 2017-01-13 20:19:14 +0800 |
commit | 20c62a132da4e32efbde7df3bb1dbdc4f448243f (patch) | |
tree | 1917110f9e502885e888bd9fff463c35798919ca /libevmasm/GasMeter.cpp | |
parent | e22672b7c739dde9f37a919e63245abda4b1fc89 (diff) | |
download | dexon-solidity-20c62a132da4e32efbde7df3bb1dbdc4f448243f.tar.gz dexon-solidity-20c62a132da4e32efbde7df3bb1dbdc4f448243f.tar.zst dexon-solidity-20c62a132da4e32efbde7df3bb1dbdc4f448243f.zip |
Make enum Tier into an enum class
Diffstat (limited to 'libevmasm/GasMeter.cpp')
-rw-r--r-- | libevmasm/GasMeter.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libevmasm/GasMeter.cpp b/libevmasm/GasMeter.cpp index 21db3565..bc7d4e55 100644 --- a/libevmasm/GasMeter.cpp +++ b/libevmasm/GasMeter.cpp @@ -223,14 +223,14 @@ unsigned GasMeter::runGas(Instruction _instruction) switch (instructionInfo(_instruction).gasPriceTier) { - case 0: return GasCosts::tier0Gas; - case 1: return GasCosts::tier1Gas; - case 2: return GasCosts::tier2Gas; - case 3: return GasCosts::tier3Gas; - case 4: return GasCosts::tier4Gas; - case 5: return GasCosts::tier5Gas; - case 6: return GasCosts::tier6Gas; - case 7: return GasCosts::tier7Gas; + case Tier::ZeroTier: return GasCosts::tier0Gas; + case Tier::BaseTier: return GasCosts::tier1Gas; + case Tier::VeryLowTier: return GasCosts::tier2Gas; + case Tier::LowTier: return GasCosts::tier3Gas; + case Tier::MidTier: return GasCosts::tier4Gas; + case Tier::HighTier: return GasCosts::tier5Gas; + case Tier::ExtTier: return GasCosts::tier6Gas; + case Tier::SpecialTier: return GasCosts::tier7Gas; default: break; } assertThrow(false, OptimizerException, "Invalid gas tier."); |