From 58be273506bf30619952eedf4c469879050c05ed Mon Sep 17 00:00:00 2001 From: Christian Date: Fri, 24 Oct 2014 18:32:15 +0200 Subject: Replace BOOST_ASSERT by assert. --- NameAndTypeResolver.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'NameAndTypeResolver.cpp') diff --git a/NameAndTypeResolver.cpp b/NameAndTypeResolver.cpp index 0f34eb4c..edd946df 100644 --- a/NameAndTypeResolver.cpp +++ b/NameAndTypeResolver.cpp @@ -20,11 +20,10 @@ * Parser part that determines the declarations corresponding to names and the types of expressions. */ +#include #include - #include #include -#include namespace dev { @@ -123,19 +122,19 @@ void DeclarationRegistrationHelper::enterNewSubScope(ASTNode& _node) std::map::iterator iter; bool newlyAdded; std::tie(iter, newlyAdded) = m_scopes.emplace(&_node, Scope(m_currentScope)); - BOOST_ASSERT(newlyAdded); + assert(newlyAdded); m_currentScope = &iter->second; } void DeclarationRegistrationHelper::closeCurrentScope() { - BOOST_ASSERT(m_currentScope); + assert(m_currentScope); m_currentScope = m_currentScope->getEnclosingScope(); } void DeclarationRegistrationHelper::registerDeclaration(Declaration& _declaration, bool _opensScope) { - BOOST_ASSERT(m_currentScope); + assert(m_currentScope); if (!m_currentScope->registerDeclaration(_declaration)) BOOST_THROW_EXCEPTION(DeclarationError() << errinfo_sourceLocation(_declaration.getLocation()) << errinfo_comment("Identifier already declared.")); @@ -162,7 +161,7 @@ void ReferencesResolver::endVisit(VariableDeclaration& _variable) bool ReferencesResolver::visit(Return& _return) { - BOOST_ASSERT(m_returnParameters); + assert(m_returnParameters); _return.setFunctionReturnParameters(*m_returnParameters); return true; } -- cgit v1.2.3