diff options
author | Christian <c@ethdev.com> | 2015-01-08 04:35:35 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-01-09 22:16:09 +0800 |
commit | a60d82d12ce84c87ae28e16dcd5002643f49637b (patch) | |
tree | f25900a00a0a1b20998ec91d5da9730b3b78deab /AST.cpp | |
parent | be623273f329b841bfda2a0aef91f091aa81b216 (diff) | |
download | dexon-solidity-a60d82d12ce84c87ae28e16dcd5002643f49637b.tar.gz dexon-solidity-a60d82d12ce84c87ae28e16dcd5002643f49637b.tar.zst dexon-solidity-a60d82d12ce84c87ae28e16dcd5002643f49637b.zip |
Remove const from make_shared to allow enable_shared_from_this to work on MacOS.
Diffstat (limited to 'AST.cpp')
-rw-r--r-- | AST.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -315,7 +315,7 @@ void NewExpression::checkTypeRequirements() m_contract = dynamic_cast<ContractDefinition const*>(m_contractName->getReferencedDeclaration()); if (!m_contract) BOOST_THROW_EXCEPTION(createTypeError("Identifier is not a contract.")); - shared_ptr<ContractType const> type = make_shared<ContractType const>(*m_contract); + shared_ptr<ContractType const> type = make_shared<ContractType>(*m_contract); m_type = type; TypePointers const& parameterTypes = type->getConstructorType()->getParameterTypes(); if (parameterTypes.size() != m_arguments.size()) @@ -366,7 +366,7 @@ void Identifier::checkTypeRequirements() if (structDef) { // note that we do not have a struct type here - m_type = make_shared<TypeType const>(make_shared<StructType const>(*structDef)); + m_type = make_shared<TypeType>(make_shared<StructType>(*structDef)); return; } FunctionDefinition const* functionDef = dynamic_cast<FunctionDefinition const*>(m_referencedDeclaration); @@ -375,13 +375,13 @@ void Identifier::checkTypeRequirements() // a function reference is not a TypeType, because calling a TypeType converts to the type. // Calling a function (e.g. function(12), otherContract.function(34)) does not do a type // conversion. - m_type = make_shared<FunctionType const>(*functionDef); + m_type = make_shared<FunctionType>(*functionDef); return; } ContractDefinition const* contractDef = dynamic_cast<ContractDefinition const*>(m_referencedDeclaration); if (contractDef) { - m_type = make_shared<TypeType const>(make_shared<ContractType>(*contractDef)); + m_type = make_shared<TypeType>(make_shared<ContractType>(*contractDef)); return; } MagicVariableDeclaration const* magicVariable = dynamic_cast<MagicVariableDeclaration const*>(m_referencedDeclaration); @@ -395,7 +395,7 @@ void Identifier::checkTypeRequirements() void ElementaryTypeNameExpression::checkTypeRequirements() { - m_type = make_shared<TypeType const>(Type::fromElementaryTypeName(m_typeToken)); + m_type = make_shared<TypeType>(Type::fromElementaryTypeName(m_typeToken)); } void Literal::checkTypeRequirements() |