mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add move assignment operator manually.
This commit is contained in:
parent
9b2a255c1b
commit
c284408e7a
@ -79,6 +79,12 @@ pair<u256, unsigned> const* StorageOffsets::getOffset(size_t _index) const
|
|||||||
return nullptr;
|
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
|
std::pair<u256, unsigned> const* MemberList::getMemberStorageOffset(string const& _name) const
|
||||||
{
|
{
|
||||||
if (!m_storageOffsets)
|
if (!m_storageOffsets)
|
||||||
|
1
Types.h
1
Types.h
@ -73,6 +73,7 @@ public:
|
|||||||
|
|
||||||
MemberList() {}
|
MemberList() {}
|
||||||
explicit MemberList(MemberMap const& _members): m_memberTypes(_members) {}
|
explicit MemberList(MemberMap const& _members): m_memberTypes(_members) {}
|
||||||
|
MemberList& operator=(MemberList&& _other);
|
||||||
TypePointer getMemberType(std::string const& _name) const
|
TypePointer getMemberType(std::string const& _name) const
|
||||||
{
|
{
|
||||||
for (auto const& it: m_memberTypes)
|
for (auto const& it: m_memberTypes)
|
||||||
|
Loading…
Reference in New Issue
Block a user