aboutsummaryrefslogtreecommitdiffstats
path: root/AST.cpp
diff options
context:
space:
mode:
authorLiana Husikyan <liana@ethdev.com>2015-03-02 21:21:12 +0800
committerLiana Husikyan <liana@ethdev.com>2015-03-02 21:28:13 +0800
commit9b6b2759b4c5ff622878eda7f136b3541cb90b52 (patch)
treeadca1fc5d1831041c35f4f261f872f04594e0424 /AST.cpp
parente9238e15b4058bf9b84c3c9c59720f255843de75 (diff)
downloaddexon-solidity-9b6b2759b4c5ff622878eda7f136b3541cb90b52.tar.gz
dexon-solidity-9b6b2759b4c5ff622878eda7f136b3541cb90b52.tar.zst
dexon-solidity-9b6b2759b4c5ff622878eda7f136b3541cb90b52.zip
removed unused member
added some comments for ModifierInvocation::checkTypeRequirements cleanup
Diffstat (limited to 'AST.cpp')
-rw-r--r--AST.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/AST.cpp b/AST.cpp
index 00660c5d..aba35576 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -353,7 +353,7 @@ void ModifierDefinition::checkTypeRequirements()
m_body->checkTypeRequirements();
}
-void ModifierInvocation::checkTypeRequirements(std::vector<ASTPointer<InheritanceSpecifier>> const& _bases)
+void ModifierInvocation::checkTypeRequirements(vector<ASTPointer<InheritanceSpecifier>> const& _bases)
{
m_modifierName->checkTypeRequirements();
for (ASTPointer<Expression> const& argument: m_arguments)
@@ -365,12 +365,12 @@ void ModifierInvocation::checkTypeRequirements(std::vector<ASTPointer<Inheritanc
if (auto modifier = dynamic_cast<ModifierDefinition const*>(declaration))
parameters = &modifier->getParameters();
else
+ // check parameters for Base constructors
for (auto const& base: _bases)
if (declaration == base->getName()->getReferencedDeclaration())
{
- m_referencedConstructor = dynamic_cast<ContractDefinition const&>(*declaration).getConstructor();
- if (m_referencedConstructor)
- parameters = &m_referencedConstructor->getParameters();
+ if (auto referencedConstructor = dynamic_cast<ContractDefinition const&>(*declaration).getConstructor())
+ parameters = &referencedConstructor->getParameters();
else
parameters = &emptyParameterList;
break;