aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-08-07 18:58:39 +0800
committerchriseth <chris@ethereum.org>2018-08-07 20:20:18 +0800
commit133fd3d302595db327115e63e0292ff44d6dfd80 (patch)
tree44e01be55fb84488a481efcc6d6230f88f350ff5
parentd0bfe4b2254a9fa30429215fba8cd7e47db7a3b0 (diff)
downloaddexon-solidity-133fd3d302595db327115e63e0292ff44d6dfd80.tar.gz
dexon-solidity-133fd3d302595db327115e63e0292ff44d6dfd80.tar.zst
dexon-solidity-133fd3d302595db327115e63e0292ff44d6dfd80.zip
Make MemberList nothrow move constructible.
-rw-r--r--libsolidity/ast/Types.cpp9
-rw-r--r--libsolidity/ast/Types.h4
2 files changed, 2 insertions, 11 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp
index 7bcae812..4ee5bfcf 100644
--- a/libsolidity/ast/Types.cpp
+++ b/libsolidity/ast/Types.cpp
@@ -169,15 +169,6 @@ pair<u256, unsigned> const* StorageOffsets::offset(size_t _index) const
return nullptr;
}
-MemberList& MemberList::operator=(MemberList&& _other)
-{
- solAssert(&_other != this, "");
-
- m_memberTypes = move(_other.m_memberTypes);
- m_storageOffsets = move(_other.m_storageOffsets);
- return *this;
-}
-
void MemberList::combine(MemberList const & _other)
{
m_memberTypes += _other.m_memberTypes;
diff --git a/libsolidity/ast/Types.h b/libsolidity/ast/Types.h
index 89b8f170..09323d05 100644
--- a/libsolidity/ast/Types.h
+++ b/libsolidity/ast/Types.h
@@ -95,9 +95,7 @@ public:
using MemberMap = std::vector<Member>;
- MemberList() {}
explicit MemberList(MemberMap const& _members): m_memberTypes(_members) {}
- MemberList& operator=(MemberList&& _other);
void combine(MemberList const& _other);
TypePointer memberType(std::string const& _name) const
{
@@ -132,6 +130,8 @@ private:
mutable std::unique_ptr<StorageOffsets> m_storageOffsets;
};
+static_assert(std::is_nothrow_move_constructible<MemberList>::value, "MemberList should be noexcept move constructible");
+
/**
* Abstract base class that forms the root of the type hierarchy.
*/