diff options
author | Alexander Arlt <alexander.arlt@arlt-labs.com> | 2018-05-02 19:29:16 +0800 |
---|---|---|
committer | Alexander Arlt <alexander.arlt@arlt-labs.com> | 2018-05-02 19:29:16 +0800 |
commit | f94b793472a8427e0507862cd5595cc92e70f53c (patch) | |
tree | b017d487890f286a05e5cfe97215f5e2a3985bb8 /libevmasm | |
parent | 5cce2e552baf1f7431c99500da74cb929360c3b8 (diff) | |
download | dexon-solidity-f94b793472a8427e0507862cd5595cc92e70f53c.tar dexon-solidity-f94b793472a8427e0507862cd5595cc92e70f53c.tar.gz dexon-solidity-f94b793472a8427e0507862cd5595cc92e70f53c.tar.bz2 dexon-solidity-f94b793472a8427e0507862cd5595cc92e70f53c.tar.lz dexon-solidity-f94b793472a8427e0507862cd5595cc92e70f53c.tar.xz dexon-solidity-f94b793472a8427e0507862cd5595cc92e70f53c.tar.zst dexon-solidity-f94b793472a8427e0507862cd5595cc92e70f53c.zip |
Add virtual destructors on base classes.
Diffstat (limited to 'libevmasm')
-rw-r--r-- | libevmasm/ConstantOptimiser.h | 1 | ||||
-rw-r--r-- | libevmasm/PeepholeOptimiser.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/libevmasm/ConstantOptimiser.h b/libevmasm/ConstantOptimiser.h index 9b60b26b..f0deb387 100644 --- a/libevmasm/ConstantOptimiser.h +++ b/libevmasm/ConstantOptimiser.h @@ -67,6 +67,7 @@ public: explicit ConstantOptimisationMethod(Params const& _params, u256 const& _value): m_params(_params), m_value(_value) {} + virtual ~ConstantOptimisationMethod() = default; virtual bigint gasNeeded() const = 0; /// Executes the method, potentially appending to the assembly and returns a vector of /// assembly items the constant should be relpaced with in one sweep. diff --git a/libevmasm/PeepholeOptimiser.h b/libevmasm/PeepholeOptimiser.h index a74cc8b3..a651143d 100644 --- a/libevmasm/PeepholeOptimiser.h +++ b/libevmasm/PeepholeOptimiser.h @@ -34,6 +34,7 @@ using AssemblyItems = std::vector<AssemblyItem>; class PeepholeOptimisationMethod { public: + virtual ~PeepholeOptimisationMethod() = default; virtual size_t windowSize() const; virtual bool apply(AssemblyItems::const_iterator _in, std::back_insert_iterator<AssemblyItems> _out); }; @@ -42,6 +43,7 @@ class PeepholeOptimiser { public: explicit PeepholeOptimiser(AssemblyItems& _items): m_items(_items) {} + virtual ~PeepholeOptimiser() = default; bool optimise(); |