Browse Source

Add move assignment operator manually.

cl-refactor
chriseth 10 years ago
parent
commit
441ab7c1c0
  1. 6
      libsolidity/Types.cpp
  2. 1
      libsolidity/Types.h

6
libsolidity/Types.cpp

@ -79,6 +79,12 @@ pair<u256, unsigned> const* StorageOffsets::getOffset(size_t _index) const
return nullptr;
}
MemberList& MemberList::operator=(MemberList&& _other)
{
m_memberTypes = std::move(_other.m_memberTypes);
m_storageOffsets = std::move(_other.m_storageOffsets);
}
std::pair<u256, unsigned> const* MemberList::getMemberStorageOffset(string const& _name) const
{
if (!m_storageOffsets)

1
libsolidity/Types.h

@ -73,6 +73,7 @@ public:
MemberList() {}
explicit MemberList(MemberMap const& _members): m_memberTypes(_members) {}
MemberList& operator=(MemberList&& _other);
TypePointer getMemberType(std::string const& _name) const
{
for (auto const& it: m_memberTypes)

Loading…
Cancel
Save