aboutsummaryrefslogtreecommitdiffstats
path: root/Types.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-03-17 02:27:53 +0800
committerchriseth <c@ethdev.com>2015-03-17 02:28:31 +0800
commitfc0bdc3d81189b52314c67e0b1d77c451b7b7091 (patch)
tree317301823b2e374b25cdc59a76a38ae7969b40a8 /Types.cpp
parentc284408e7a31f2e24611cf6360b492e35ab1c0b5 (diff)
downloaddexon-solidity-fc0bdc3d81189b52314c67e0b1d77c451b7b7091.tar.gz
dexon-solidity-fc0bdc3d81189b52314c67e0b1d77c451b7b7091.tar.zst
dexon-solidity-fc0bdc3d81189b52314c67e0b1d77c451b7b7091.zip
Fix static variables.
Diffstat (limited to 'Types.cpp')
-rw-r--r--Types.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/Types.cpp b/Types.cpp
index 29543483..04f86b92 100644
--- a/Types.cpp
+++ b/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<u256, unsigned> 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<IntegerType >(256)},
- {"call", make_shared<FunctionType>(strings(), strings(), FunctionType::Location::Bare, true)},
- {"send", make_shared<FunctionType>(strings{"uint"}, strings{}, FunctionType::Location::Send)}});
+const MemberList IntegerType::AddressMemberList({
+ {"balance", make_shared<IntegerType >(256)},
+ {"call", make_shared<FunctionType>(strings(), strings(), FunctionType::Location::Bare, true)},
+ {"send", make_shared<FunctionType>(strings{"uint"}, strings{}, FunctionType::Location::Send)}
+});
IntegerConstantType::IntegerConstantType(Literal const& _literal)
{
@@ -749,7 +751,7 @@ shared_ptr<ArrayType> ArrayType::copyForLocation(ArrayType::Location _location)
return copy;
}
-const MemberList ArrayType::s_arrayTypeMemberList = MemberList({{"length", make_shared<IntegerType>(256)}});
+const MemberList ArrayType::s_arrayTypeMemberList({{"length", make_shared<IntegerType>(256)}});
bool ContractType::operator==(Type const& _other) const
{