Skip to content

Commit 9446ea1

Browse files
gmh5225nikola-matic
authored andcommitted
Fix MSVC compilation error on EVMVersion comparison
1 parent 94bfae1 commit 9446ea1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

liblangutil/EVMVersion.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919
* EVM versioning.
2020
*/
2121

22-
#include <libevmasm/Instruction.h>
2322
#include <liblangutil/EVMVersion.h>
24-
23+
#include <libevmasm/Instruction.h>
2524

2625
using namespace solidity;
2726
using namespace solidity::evmasm;
@@ -30,7 +29,7 @@ using namespace solidity::langutil;
3029
bool EVMVersion::hasOpcode(Instruction _opcode, std::optional<uint8_t> _eofVersion) const
3130
{
3231
// EOF version can be only defined since prague
33-
assert(!_eofVersion.has_value() || static_cast<int>(m_version) >= static_cast<int>(prague().m_version));
32+
assert(!_eofVersion.has_value() || *this >= prague());
3433

3534
switch (_opcode)
3635
{

0 commit comments

Comments
 (0)