mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
added checks to prevent the self assignment
This commit is contained in:
parent
666062cf07
commit
2a9c650c9e
@ -79,6 +79,8 @@ pair<u256, unsigned> const* StorageOffsets::getOffset(size_t _index) const
|
||||
|
||||
MemberList& MemberList::operator=(MemberList&& _other)
|
||||
{
|
||||
assert(&_other != this);
|
||||
|
||||
m_memberTypes = std::move(_other.m_memberTypes);
|
||||
m_storageOffsets = std::move(_other.m_storageOffsets);
|
||||
return *this;
|
||||
|
Loading…
Reference in New Issue
Block a user