mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
libevmasm: Remove unnecessary cref in Assembly::append(.)
This commit is contained in:
parent
daf61a4c90
commit
a4876ea930
@ -48,11 +48,11 @@ using namespace solidity::evmasm;
|
|||||||
using namespace solidity::langutil;
|
using namespace solidity::langutil;
|
||||||
using namespace solidity::util;
|
using namespace solidity::util;
|
||||||
|
|
||||||
AssemblyItem const& Assembly::append(AssemblyItem const& _i)
|
AssemblyItem const& Assembly::append(AssemblyItem _i)
|
||||||
{
|
{
|
||||||
assertThrow(m_deposit >= 0, AssemblyException, "Stack underflow.");
|
assertThrow(m_deposit >= 0, AssemblyException, "Stack underflow.");
|
||||||
m_deposit += static_cast<int>(_i.deposit());
|
m_deposit += static_cast<int>(_i.deposit());
|
||||||
m_items.emplace_back(_i);
|
m_items.emplace_back(move(_i));
|
||||||
if (!m_items.back().location().isValid() && m_currentSourceLocation.isValid())
|
if (!m_items.back().location().isValid() && m_currentSourceLocation.isValid())
|
||||||
m_items.back().setLocation(m_currentSourceLocation);
|
m_items.back().setLocation(m_currentSourceLocation);
|
||||||
m_items.back().m_modifierDepth = m_currentModifierDepth;
|
m_items.back().m_modifierDepth = m_currentModifierDepth;
|
||||||
|
@ -64,7 +64,7 @@ public:
|
|||||||
AssemblyItem newPushImmutable(std::string const& _identifier);
|
AssemblyItem newPushImmutable(std::string const& _identifier);
|
||||||
AssemblyItem newImmutableAssignment(std::string const& _identifier);
|
AssemblyItem newImmutableAssignment(std::string const& _identifier);
|
||||||
|
|
||||||
AssemblyItem const& append(AssemblyItem const& _i);
|
AssemblyItem const& append(AssemblyItem _i);
|
||||||
AssemblyItem const& append(bytes const& _data) { return append(newData(_data)); }
|
AssemblyItem const& append(bytes const& _data) { return append(newData(_data)); }
|
||||||
|
|
||||||
template <class T> Assembly& operator<<(T const& _d) { append(_d); return *this; }
|
template <class T> Assembly& operator<<(T const& _d) { append(_d); return *this; }
|
||||||
|
Loading…
Reference in New Issue
Block a user