aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-07-11 03:36:29 +0800
committerchriseth <chris@ethereum.org>2018-07-11 03:36:47 +0800
commit1fed3519e1f8d04620a64e415770a0cb55804d04 (patch)
treef6f7896fe4eeb33c9eebadb1f00efe68277ea346 /libevmasm
parent12045d2e110348950c81963adcd1a6fe6b42143f (diff)
downloaddexon-solidity-1fed3519e1f8d04620a64e415770a0cb55804d04.tar.gz
dexon-solidity-1fed3519e1f8d04620a64e415770a0cb55804d04.tar.zst
dexon-solidity-1fed3519e1f8d04620a64e415770a0cb55804d04.zip
Fix comparison operator for GasConsumption.
Diffstat (limited to 'libevmasm')
-rw-r--r--libevmasm/GasMeter.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/libevmasm/GasMeter.h b/libevmasm/GasMeter.h
index b131802f..fc3740d2 100644
--- a/libevmasm/GasMeter.h
+++ b/libevmasm/GasMeter.h
@@ -112,9 +112,10 @@ public:
static GasConsumption infinite() { return GasConsumption(0, true); }
GasConsumption& operator+=(GasConsumption const& _other);
- bool operator<(GasConsumption const& _other) const { return this->tuple() < _other.tuple(); }
-
- std::tuple<bool const&, u256 const&> tuple() const { return std::tie(isInfinite, value); }
+ bool operator<(GasConsumption const& _other) const
+ {
+ return std::make_pair(isInfinite, value) < std::make_pair(_other.isInfinite, _other.value);
+ }
u256 value;
bool isInfinite;