added checks to prevent the self assignment

This commit is contained in:
Liana Husikyan 2015-08-10 17:55:31 +02:00
parent 666062cf07
commit 2a9c650c9e

View File

@ -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;