From 5840ca5babe9de28fc51af8ca2e83275882cf4b9 Mon Sep 17 00:00:00 2001 From: gereon Date: Tue, 30 Apr 2013 15:20:35 +0200 Subject: [PATCH] Fixed weird error from previous commit. --- src/parser/PrismParser/VariableState.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/parser/PrismParser/VariableState.cpp b/src/parser/PrismParser/VariableState.cpp index 91d41be77..117edf954 100644 --- a/src/parser/PrismParser/VariableState.cpp +++ b/src/parser/PrismParser/VariableState.cpp @@ -53,9 +53,6 @@ uint_fast64_t VariableState::addIntegerVariable(const std::string& name, const s std::shared_ptr varExpr = std::shared_ptr(new VariableExpression(storm::ir::expressions::BaseExpression::int_, this->nextIntegerVariableIndex, name, lower, upper)); LOG4CPLUS_DEBUG(logger, "Adding integer variable " << name << " with new id " << this->nextIntegerVariableIndex); this->integerVariables_.add(name, varExpr); - LOG4CPLUS_DEBUG(logger, "Int variables: " << this->integerVariables_); - this->integerVariables_.at(name) = varExpr; - LOG4CPLUS_DEBUG(logger, "Int variables: " << this->integerVariables_); this->integerVariableNames_.add(name, name); this->nextIntegerVariableIndex++; return varExpr->getVariableIndex(); @@ -72,10 +69,9 @@ uint_fast64_t VariableState::addIntegerVariable(const std::string& name, const s } std::shared_ptr VariableState::getBooleanVariable(const std::string& name) { - std::shared_ptr res = this->booleanVariables_.at(name); + std::shared_ptr* res = this->booleanVariables_.find(name); if (res != nullptr) { - LOG4CPLUS_DEBUG(logger, "Getting boolean variable " << name << ", was found at " << res); - return res; + return *res; } else { if (firstRun) { LOG4CPLUS_DEBUG(logger, "Getting boolean variable " << name << ", was not yet created."); @@ -88,10 +84,9 @@ std::shared_ptr VariableState::getBooleanVariable(const std: } std::shared_ptr VariableState::getIntegerVariable(const std::string& name) { - std::shared_ptr res = this->integerVariables_.at(name); + std::shared_ptr* res = this->integerVariables_.find(name); if (res != nullptr) { - LOG4CPLUS_DEBUG(logger, "Getting integer variable " << name << ", was found at " << res); - return res; + return *res; } else { if (firstRun) { LOG4CPLUS_DEBUG(logger, "Getting integer variable " << name << ", was not yet created.");