From eaff65ef27593d6d1ee3be67ebc2c62b9d039c1a Mon Sep 17 00:00:00 2001 From: Tim Quatmann Date: Tue, 9 Mar 2021 07:15:22 +0100 Subject: [PATCH] LinearCoefficientVisitor: Fixed translation of division expressions. --- src/storm/storage/expressions/LinearCoefficientVisitor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storm/storage/expressions/LinearCoefficientVisitor.cpp b/src/storm/storage/expressions/LinearCoefficientVisitor.cpp index 6f3e45c80..98d2df85e 100644 --- a/src/storm/storage/expressions/LinearCoefficientVisitor.cpp +++ b/src/storm/storage/expressions/LinearCoefficientVisitor.cpp @@ -42,8 +42,8 @@ namespace storm { LinearCoefficientVisitor::VariableCoefficients& LinearCoefficientVisitor::VariableCoefficients::operator/=(VariableCoefficients&& other) { STORM_LOG_THROW(other.variableToCoefficientMapping.size() == 0, storm::exceptions::InvalidArgumentException, "Expression is non-linear."); - for (auto const& otherVariableCoefficientPair : other.variableToCoefficientMapping) { - this->variableToCoefficientMapping[otherVariableCoefficientPair.first] /= other.constantPart; + for (auto& variableCoefficientPair : this->variableToCoefficientMapping) { + variableCoefficientPair.second /= other.constantPart; } constantPart /= other.constantPart; return *this;