diff options
author | chriseth <c@ethdev.com> | 2015-11-24 06:57:17 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-11-26 22:37:55 +0800 |
commit | b47d5932528357939ee29758a8b8027c90bdb1e5 (patch) | |
tree | a32526db014b5a654e193660e883e97ab437aa95 /libsolidity/codegen/CompilerContext.cpp | |
parent | 86495dfc57dde9b825ffd8c219ea809446e978f9 (diff) | |
download | dexon-solidity-b47d5932528357939ee29758a8b8027c90bdb1e5.tar.gz dexon-solidity-b47d5932528357939ee29758a8b8027c90bdb1e5.tar.zst dexon-solidity-b47d5932528357939ee29758a8b8027c90bdb1e5.zip |
Do not store elements of a contract by AST node type.
Diffstat (limited to 'libsolidity/codegen/CompilerContext.cpp')
-rw-r--r-- | libsolidity/codegen/CompilerContext.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libsolidity/codegen/CompilerContext.cpp b/libsolidity/codegen/CompilerContext.cpp index 00b9d87c..9e2405cc 100644 --- a/libsolidity/codegen/CompilerContext.cpp +++ b/libsolidity/codegen/CompilerContext.cpp @@ -133,9 +133,9 @@ ModifierDefinition const& CompilerContext::functionModifier(string const& _name) { solAssert(!m_inheritanceHierarchy.empty(), "No inheritance hierarchy set."); for (ContractDefinition const* contract: m_inheritanceHierarchy) - for (ASTPointer<ModifierDefinition> const& modifier: contract->functionModifiers()) + for (ModifierDefinition const* modifier: contract->functionModifiers()) if (modifier->name() == _name) - return *modifier.get(); + return *modifier; BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Function modifier " + _name + " not found.")); } @@ -195,7 +195,7 @@ eth::AssemblyItem CompilerContext::virtualFunctionEntryLabel( FunctionType functionType(_function); auto it = _searchStart; for (; it != m_inheritanceHierarchy.end(); ++it) - for (ASTPointer<FunctionDefinition> const& function: (*it)->definedFunctions()) + for (FunctionDefinition const* function: (*it)->definedFunctions()) if ( function->name() == name && !function->isConstructor() && |