From 8d98403748205fe7ea06ffc89b2a49b6598ace27 Mon Sep 17 00:00:00 2001 From: dehnert <dehnert@cs.rwth-aachen.de> Date: Tue, 10 Nov 2015 15:17:58 +0100 Subject: [PATCH 1/2] small fix for use of carl Former-commit-id: 63a0e38cf512377d30fdb474e87ab5a7da76914f --- src/storage/expressions/ToRationalFunctionVisitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage/expressions/ToRationalFunctionVisitor.cpp b/src/storage/expressions/ToRationalFunctionVisitor.cpp index d2d86b716..97501aa1b 100644 --- a/src/storage/expressions/ToRationalFunctionVisitor.cpp +++ b/src/storage/expressions/ToRationalFunctionVisitor.cpp @@ -65,7 +65,7 @@ namespace storm { if (variablePair != variableToVariableMap.end()) { return convertVariableToPolynomial(variablePair->second); } else { - carl::Variable carlVariable = carl::freshVariable(expression.getVariableName(), carl::VariableType::VT_REAL); + carl::Variable carlVariable = carl::freshRealVariable(expression.getVariableName()); variableToVariableMap.emplace(expression.getVariable(), carlVariable); return convertVariableToPolynomial(carlVariable); } From b88165f27cdca16892b3fd7c61f6b82eae6432e3 Mon Sep 17 00:00:00 2001 From: dehnert <dehnert@cs.rwth-aachen.de> Date: Tue, 10 Nov 2015 15:58:19 +0100 Subject: [PATCH 2/2] fixed the warnings related to our macros Former-commit-id: 526b6ea95666ad6d4a5bcaef68c1d68877f59da8 --- src/settings/OptionBuilder.h | 2 +- src/utility/macros.h | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/settings/OptionBuilder.h b/src/settings/OptionBuilder.h index 622a7cb1c..f70ac7c2a 100644 --- a/src/settings/OptionBuilder.h +++ b/src/settings/OptionBuilder.h @@ -85,7 +85,7 @@ namespace storm { * @return The resulting option. */ std::shared_ptr<Option> build() { - STORM_LOG_THROW(!this->isBuild, storm::exceptions::IllegalFunctionCallException, "Cannot rebuild an option with one builder.") + STORM_LOG_THROW(!this->isBuild, storm::exceptions::IllegalFunctionCallException, "Cannot rebuild an option with one builder."); this->isBuild = true; if (this->hasShortName) { diff --git a/src/utility/macros.h b/src/utility/macros.h index b84cd53b5..037d1882b 100644 --- a/src/utility/macros.h +++ b/src/utility/macros.h @@ -12,19 +12,19 @@ extern log4cplus::Logger logger; * Define the macros STORM_LOG_DEBUG and STORM_LOG_TRACE. */ #define STORM_LOG_DEBUG(message) \ -{ \ +do { \ LOG4CPLUS_DEBUG(logger, message); \ } while (false) \ #define STORM_LOG_TRACE(message) \ -{ \ +do { \ LOG4CPLUS_TRACE(logger, message); \ } while (false) \ // Define STORM_LOG_ASSERT which is only checked when NDEBUG is not set. #ifndef NDEBUG #define STORM_LOG_ASSERT(cond, message) \ -{ \ +do { \ if (!(cond)) { \ LOG4CPLUS_ERROR(logger, message); \ assert(cond); \ @@ -36,7 +36,7 @@ assert(cond); \ #endif // Define STORM_LOG_THROW to always throw the exception with the given message if the condition fails to hold. #define STORM_LOG_THROW(cond, exception, message) \ -{ \ +do { \ if (!(cond)) { \ LOG4CPLUS_ERROR(logger, message); \ throw exception() << message; \ @@ -46,36 +46,36 @@ assert(cond); \ // Define STORM_LOG_WARN, STORM_LOG_ERROR and STORM_LOG_INFO to log the given message with the corresponding log levels. #define STORM_LOG_WARN(message) \ -{ \ +do { \ LOG4CPLUS_WARN(logger, message); \ } while (false) \ #define STORM_LOG_WARN_COND(cond, message) \ -{ \ +do { \ if (!(cond)) { \ LOG4CPLUS_WARN(logger, message); \ } \ } while (false) \ #define STORM_LOG_INFO(message) \ -{ \ +do { \ LOG4CPLUS_INFO(logger, message); \ } while (false) \ #define STORM_LOG_INFO_COND(cond, message) \ -{ \ +do { \ if (!(cond)) { \ LOG4CPLUS_INFO(logger, message); \ } \ } while (false) \ #define STORM_LOG_ERROR(message) \ -{ \ +do { \ LOG4CPLUS_ERROR(logger, message); \ } while (false) \ #define STORM_LOG_ERROR_COND(cond, message) \ -{ \ +do { \ if (!(cond)) { \ LOG4CPLUS_ERROR(logger, message); \ } \