diff options
author | chriseth <c@ethdev.com> | 2015-05-12 22:16:44 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-05-12 22:27:43 +0800 |
commit | ced4720faa63eb7a1842eb1dbc17522a1ec458fd (patch) | |
tree | 5701cb7b4353d50f878a17879e3bc148ed00e454 /AssemblyItem.h | |
parent | 60d69c78f5d165341ce76f63a7e95418c95a3481 (diff) | |
download | dexon-solidity-ced4720faa63eb7a1842eb1dbc17522a1ec458fd.tar.gz dexon-solidity-ced4720faa63eb7a1842eb1dbc17522a1ec458fd.tar.zst dexon-solidity-ced4720faa63eb7a1842eb1dbc17522a1ec458fd.zip |
Unify blocks with shared code.
Diffstat (limited to 'AssemblyItem.h')
-rw-r--r-- | AssemblyItem.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/AssemblyItem.h b/AssemblyItem.h index 6f2a65de..b3012a7e 100644 --- a/AssemblyItem.h +++ b/AssemblyItem.h @@ -68,6 +68,8 @@ public: /// @returns true iff the type and data of the items are equal. bool operator==(AssemblyItem const& _other) const { return m_type == _other.m_type && m_data == _other.m_data; } bool operator!=(AssemblyItem const& _other) const { return !operator==(_other); } + /// Less-than operator compatible with operator==. + bool operator<(AssemblyItem const& _other) const { return std::tie(m_type, m_data) < std::tie(_other.m_type, _other.m_data); } /// @returns an upper bound for the number of bytes required by this item, assuming that /// the value of a jump tag takes @a _addressLength bytes. |