From 3cfa851f6f4175ef17c4fc1079cda67b516a2d72 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 12 Jan 2017 17:52:23 +0100 Subject: Minor changes from review. --- libevmasm/AssemblyItem.h | 1 - libevmasm/ConstantOptimiser.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'libevmasm') diff --git a/libevmasm/AssemblyItem.h b/libevmasm/AssemblyItem.h index 7fcaa145..002b3c87 100644 --- a/libevmasm/AssemblyItem.h +++ b/libevmasm/AssemblyItem.h @@ -86,7 +86,6 @@ public: AssemblyItemType type() const { return m_type; } u256 const& data() const { assertThrow(m_type != Operation, Exception, ""); return *m_data; } - //void setType(AssemblyItemType const _type) { m_type = _type; } void setData(u256 const& _data) { assertThrow(m_type != Operation, Exception, ""); m_data = std::make_shared(_data); } /// @returns the instruction of this item (only valid if type() == Operation) diff --git a/libevmasm/ConstantOptimiser.cpp b/libevmasm/ConstantOptimiser.cpp index 601ce812..86244e17 100644 --- a/libevmasm/ConstantOptimiser.cpp +++ b/libevmasm/ConstantOptimiser.cpp @@ -60,7 +60,7 @@ unsigned ConstantOptimisationMethod::optimiseConstants( replacement = copy.execute(_assembly); optimisations++; } - else if (computeGas < literalGas && computeGas < copyGas) + else if (computeGas < literalGas && computeGas <= copyGas) { replacement = compute.execute(_assembly); optimisations++; -- cgit v1.2.3