patrick
/
plasp
Archived
1
0
Fork 0

Removed Boost dependency in assertions.

Instead of using BOOST_ASSERT, this commit changes all assertions to
plain C-style assertions in order to drop the dependency to Boost.
This commit is contained in:
Patrick Lühne 2017-10-28 16:49:15 +02:00
parent ca7ae883ee
commit e87f86af95
No known key found for this signature in database
GPG Key ID: 05F3611E97A70ABF
4 changed files with 9 additions and 13 deletions

View File

@ -1,6 +1,6 @@
#include <plasp/pddl/TranslatorASP.h>
#include <boost/assert.hpp>
#include <cassert>
#include <colorlog/Formatting.h>

View File

@ -1,9 +1,8 @@
#include <plasp/sas/AssignedVariable.h>
#include <cassert>
#include <iostream>
#include <boost/assert.hpp>
namespace plasp
{
namespace sas
@ -57,7 +56,7 @@ AssignedVariable AssignedVariable::fromSAS(tokenize::Tokenizer<> &tokenizer, con
const Variable &AssignedVariable::variable() const
{
BOOST_ASSERT(m_variable != nullptr);
assert(m_variable != nullptr);
return *m_variable;
}
@ -66,7 +65,7 @@ const Variable &AssignedVariable::variable() const
const Value &AssignedVariable::value() const
{
BOOST_ASSERT(m_value != nullptr);
assert(m_value != nullptr);
return *m_value;
}

View File

@ -1,7 +1,5 @@
#include <plasp/sas/TranslatorASP.h>
#include <boost/assert.hpp>
#include <colorlog/Formatting.h>
namespace plasp
@ -121,7 +119,7 @@ void TranslatorASP::translateVariables() const
{
const auto &values = variable.values();
BOOST_ASSERT(!values.empty());
assert(!values.empty());
m_outputStream << std::endl << colorlog::Function("variable") << "(";
variable.printNameAsASPPredicate(m_outputStream);

View File

@ -1,9 +1,8 @@
#include <plasp/sas/VariableTransition.h>
#include <cassert>
#include <iostream>
#include <boost/assert.hpp>
namespace plasp
{
namespace sas
@ -39,7 +38,7 @@ VariableTransition VariableTransition::fromSAS(tokenize::Tokenizer<> &tokenizer,
const Variable &VariableTransition::variable() const
{
BOOST_ASSERT(m_variable != nullptr);
assert(m_variable != nullptr);
return *m_variable;
}
@ -48,7 +47,7 @@ const Variable &VariableTransition::variable() const
const Value &VariableTransition::valueBefore() const
{
BOOST_ASSERT(m_valueBefore != nullptr);
assert(m_valueBefore != nullptr);
return *m_valueBefore;
}
@ -57,7 +56,7 @@ const Value &VariableTransition::valueBefore() const
const Value &VariableTransition::valueAfter() const
{
BOOST_ASSERT(m_valueAfter != nullptr);
assert(m_valueAfter != nullptr);
return *m_valueAfter;
}