libevmasm: Remove unnecessary cref in Assembly::append(.)

This commit is contained in:
Christian Parpart 2021-09-22 15:14:31 +02:00 committed by Marenz
parent daf61a4c90
commit a4876ea930
2 changed files with 3 additions and 3 deletions

View File

@ -48,11 +48,11 @@ using namespace solidity::evmasm;
using namespace solidity::langutil;
using namespace solidity::util;
AssemblyItem const& Assembly::append(AssemblyItem const& _i)
AssemblyItem const& Assembly::append(AssemblyItem _i)
{
assertThrow(m_deposit >= 0, AssemblyException, "Stack underflow.");
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())
m_items.back().setLocation(m_currentSourceLocation);
m_items.back().m_modifierDepth = m_currentModifierDepth;

View File

@ -64,7 +64,7 @@ public:
AssemblyItem newPushImmutable(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)); }
template <class T> Assembly& operator<<(T const& _d) { append(_d); return *this; }