diff options
author | Christian <c@ethdev.com> | 2014-10-25 00:32:15 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-10-25 01:40:47 +0800 |
commit | 58be273506bf30619952eedf4c469879050c05ed (patch) | |
tree | 4d9767dbe624d552f89a8cc1b8c48c54d21feb18 /NameAndTypeResolver.cpp | |
parent | 9141725cf238c028dd00f4a7f814878031ef48a0 (diff) | |
download | dexon-solidity-58be273506bf30619952eedf4c469879050c05ed.tar dexon-solidity-58be273506bf30619952eedf4c469879050c05ed.tar.gz dexon-solidity-58be273506bf30619952eedf4c469879050c05ed.tar.bz2 dexon-solidity-58be273506bf30619952eedf4c469879050c05ed.tar.lz dexon-solidity-58be273506bf30619952eedf4c469879050c05ed.tar.xz dexon-solidity-58be273506bf30619952eedf4c469879050c05ed.tar.zst dexon-solidity-58be273506bf30619952eedf4c469879050c05ed.zip |
Replace BOOST_ASSERT by assert.
Diffstat (limited to 'NameAndTypeResolver.cpp')
-rw-r--r-- | NameAndTypeResolver.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
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 <cassert> #include <libsolidity/NameAndTypeResolver.h> - #include <libsolidity/AST.h> #include <libsolidity/Exceptions.h> -#include <boost/assert.hpp> namespace dev { @@ -123,19 +122,19 @@ void DeclarationRegistrationHelper::enterNewSubScope(ASTNode& _node) std::map<ASTNode*, Scope>::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; } |