From 2589570d9a523c37a49572b0b35cff9b46f81101 Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 16 Mar 2015 19:27:53 +0100 Subject: [PATCH] Fix static variables. --- libsolidity/Types.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/libsolidity/Types.cpp b/libsolidity/Types.cpp index 295434836..04f86b922 100644 --- a/libsolidity/Types.cpp +++ b/libsolidity/Types.cpp @@ -83,6 +83,7 @@ MemberList& MemberList::operator=(MemberList&& _other) { m_memberTypes = std::move(_other.m_memberTypes); m_storageOffsets = std::move(_other.m_storageOffsets); + return *this; } std::pair const* MemberList::getMemberStorageOffset(string const& _name) const @@ -223,7 +224,7 @@ TypePointer Type::commonType(TypePointer const& _a, TypePointer const& _b) return TypePointer(); } -const MemberList Type::EmptyMemberList = MemberList(); +const MemberList Type::EmptyMemberList; IntegerType::IntegerType(int _bits, IntegerType::Modifier _modifier): m_bits(_bits), m_modifier(_modifier) @@ -309,10 +310,11 @@ TypePointer IntegerType::binaryOperatorResult(Token::Value _operator, TypePointe return commonType; } -const MemberList IntegerType::AddressMemberList = - MemberList({{"balance", make_shared(256)}, - {"call", make_shared(strings(), strings(), FunctionType::Location::Bare, true)}, - {"send", make_shared(strings{"uint"}, strings{}, FunctionType::Location::Send)}}); +const MemberList IntegerType::AddressMemberList({ + {"balance", make_shared(256)}, + {"call", make_shared(strings(), strings(), FunctionType::Location::Bare, true)}, + {"send", make_shared(strings{"uint"}, strings{}, FunctionType::Location::Send)} +}); IntegerConstantType::IntegerConstantType(Literal const& _literal) { @@ -749,7 +751,7 @@ shared_ptr ArrayType::copyForLocation(ArrayType::Location _location) return copy; } -const MemberList ArrayType::s_arrayTypeMemberList = MemberList({{"length", make_shared(256)}}); +const MemberList ArrayType::s_arrayTypeMemberList({{"length", make_shared(256)}}); bool ContractType::operator==(Type const& _other) const {