aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm/Assembly.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2016-11-16 18:16:01 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-06-22 18:25:06 +0800
commitbecea47ac3066c7d8d448d0e428cd84d351061e3 (patch)
treed45a203568ccd99ecb66620872440dd1f29403a7 /libevmasm/Assembly.cpp
parent1c54ce2a2caa6c4d91091152ad8a52b7881e8b83 (diff)
downloaddexon-solidity-becea47ac3066c7d8d448d0e428cd84d351061e3.tar.gz
dexon-solidity-becea47ac3066c7d8d448d0e428cd84d351061e3.tar.zst
dexon-solidity-becea47ac3066c7d8d448d0e428cd84d351061e3.zip
Use assertThrow where possible
Diffstat (limited to 'libevmasm/Assembly.cpp')
-rw-r--r--libevmasm/Assembly.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/libevmasm/Assembly.cpp b/libevmasm/Assembly.cpp
index 606714d2..27199b7b 100644
--- a/libevmasm/Assembly.cpp
+++ b/libevmasm/Assembly.cpp
@@ -59,14 +59,11 @@ void Assembly::append(Assembly const& _a)
void Assembly::append(Assembly const& _a, int _deposit)
{
- if (_deposit > _a.m_deposit)
- BOOST_THROW_EXCEPTION(InvalidDeposit());
- else
- {
- append(_a);
- while (_deposit++ < _a.m_deposit)
- append(Instruction::POP);
- }
+ assertThrow(_deposit <= _a.m_deposit, InvalidDeposit, "");
+
+ append(_a);
+ while (_deposit++ < _a.m_deposit)
+ append(Instruction::POP);
}
unsigned Assembly::bytesRequired(unsigned subTagSize) const