diff options
author | Christian <c@ethdev.com> | 2014-12-06 09:32:51 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-12-08 20:15:43 +0800 |
commit | f636ac6fc4eda7591c1056475c1258af5309a264 (patch) | |
tree | cd209788dbe68227a22b859093e86906f0a5e73a /AST.cpp | |
parent | 13640d7db82562592958fcce2d7ce8155cc7ea35 (diff) | |
download | dexon-solidity-f636ac6fc4eda7591c1056475c1258af5309a264.tar.gz dexon-solidity-f636ac6fc4eda7591c1056475c1258af5309a264.tar.zst dexon-solidity-f636ac6fc4eda7591c1056475c1258af5309a264.zip |
More const cleanup.
Diffstat (limited to 'AST.cpp')
-rw-r--r-- | AST.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -746,7 +746,7 @@ void Identifier::checkTypeRequirements() if (asserts(m_referencedDeclaration)) BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Identifier not resolved.")); - VariableDeclaration* variable = dynamic_cast<VariableDeclaration*>(m_referencedDeclaration); + VariableDeclaration const* variable = dynamic_cast<VariableDeclaration const*>(m_referencedDeclaration); if (variable) { if (!variable->getType()) @@ -756,29 +756,29 @@ void Identifier::checkTypeRequirements() return; } //@todo can we unify these with TypeName::toType()? - StructDefinition* structDef = dynamic_cast<StructDefinition*>(m_referencedDeclaration); + StructDefinition const* structDef = dynamic_cast<StructDefinition const*>(m_referencedDeclaration); if (structDef) { // note that we do not have a struct type here - m_type = make_shared<TypeType>(make_shared<StructType>(*structDef)); + m_type = make_shared<TypeType const>(make_shared<StructType const>(*structDef)); return; } - FunctionDefinition* functionDef = dynamic_cast<FunctionDefinition*>(m_referencedDeclaration); + FunctionDefinition const* functionDef = dynamic_cast<FunctionDefinition const*>(m_referencedDeclaration); if (functionDef) { // 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>(*functionDef); + m_type = make_shared<FunctionType const>(*functionDef); return; } - ContractDefinition* contractDef = dynamic_cast<ContractDefinition*>(m_referencedDeclaration); + ContractDefinition const* contractDef = dynamic_cast<ContractDefinition const*>(m_referencedDeclaration); if (contractDef) { - m_type = make_shared<TypeType>(make_shared<ContractType>(*contractDef)); + m_type = make_shared<TypeType const>(make_shared<ContractType>(*contractDef)); return; } - MagicVariableDeclaration* magicVariable = dynamic_cast<MagicVariableDeclaration*>(m_referencedDeclaration); + MagicVariableDeclaration const* magicVariable = dynamic_cast<MagicVariableDeclaration const*>(m_referencedDeclaration); if (magicVariable) { m_type = magicVariable->getType(); @@ -789,7 +789,7 @@ void Identifier::checkTypeRequirements() void ElementaryTypeNameExpression::checkTypeRequirements() { - m_type = make_shared<TypeType>(Type::fromElementaryTypeName(m_typeToken)); + m_type = make_shared<TypeType const>(Type::fromElementaryTypeName(m_typeToken)); } void Literal::checkTypeRequirements() |