This commit is contained in:
chriseth 2015-12-14 18:01:40 +01:00
parent f8228e8ab1
commit 53da78e609

View File

@ -113,7 +113,7 @@ bool NameAndTypeResolver::resolveNamesAndTypes(ContractDefinition& _contract)
if (success) if (success)
{ {
linearizeBaseContracts(_contract); linearizeBaseContracts(_contract);
std::vector<ContractDefinition const*> properBases( vector<ContractDefinition const*> properBases(
++_contract.annotation().linearizedBaseContracts.begin(), ++_contract.annotation().linearizedBaseContracts.begin(),
_contract.annotation().linearizedBaseContracts.end() _contract.annotation().linearizedBaseContracts.end()
); );
@ -380,7 +380,7 @@ void NameAndTypeResolver::reportFatalTypeError(Error const& _e)
} }
DeclarationRegistrationHelper::DeclarationRegistrationHelper( DeclarationRegistrationHelper::DeclarationRegistrationHelper(
map<ASTNode const*, std::unique_ptr<DeclarationContainer>>& _scopes, map<ASTNode const*, unique_ptr<DeclarationContainer>>& _scopes,
ASTNode& _astRoot, ASTNode& _astRoot,
ErrorList& _errors ErrorList& _errors
): ):
@ -489,9 +489,9 @@ void DeclarationRegistrationHelper::endVisit(EventDefinition&)
void DeclarationRegistrationHelper::enterNewSubScope(Declaration const& _declaration) void DeclarationRegistrationHelper::enterNewSubScope(Declaration const& _declaration)
{ {
map<ASTNode const*, std::unique_ptr<DeclarationContainer>>::iterator iter; map<ASTNode const*, unique_ptr<DeclarationContainer>>::iterator iter;
bool newlyAdded; bool newlyAdded;
std::unique_ptr<DeclarationContainer> container(new DeclarationContainer(m_currentScope, m_scopes[m_currentScope].get())); unique_ptr<DeclarationContainer> container(new DeclarationContainer(m_currentScope, m_scopes[m_currentScope].get()));
tie(iter, newlyAdded) = m_scopes.emplace(&_declaration, move(container)); tie(iter, newlyAdded) = m_scopes.emplace(&_declaration, move(container));
solAssert(newlyAdded, "Unable to add new scope."); solAssert(newlyAdded, "Unable to add new scope.");
m_currentScope = &_declaration; m_currentScope = &_declaration;