diff --git a/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp b/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp index 184c1e027..845e7495e 100644 --- a/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp +++ b/src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp @@ -667,9 +667,11 @@ namespace storm { } void multiplyRow(uint64_t const& row, storm::storage::SparseMatrix const& A, storm::solver::Multiplier const& multiplier, ValueType const& bi, ValueType& xi, ValueType& yi) { - xi = bi; - yi = storm::utility::zero(); - multiplier.multiplyRow2(row, x, xi, y, yi); + ValueType xRes = bi; + ValueType yRes = storm::utility::zero(); + multiplier.multiplyRow2(row, x, xRes, y, yRes); + xi = std::move(xRes); + yi = std::move(yRes); } template diff --git a/src/storm/solver/NativeLinearEquationSolver.cpp b/src/storm/solver/NativeLinearEquationSolver.cpp index 51b8fa3c9..48a2819c7 100644 --- a/src/storm/solver/NativeLinearEquationSolver.cpp +++ b/src/storm/solver/NativeLinearEquationSolver.cpp @@ -591,9 +591,11 @@ namespace storm { } void multiplyRow(uint64_t const& row, storm::storage::SparseMatrix const& A, storm::solver::Multiplier const& multiplier, ValueType const& bi, ValueType& xi, ValueType& yi) { - xi = bi; - yi = storm::utility::zero(); - multiplier.multiplyRow2(row, x, xi, y, yi); + ValueType xRes = bi; + ValueType yRes = storm::utility::zero(); + multiplier.multiplyRow2(row, x, xRes, y, yRes); + xi = std::move(xRes); + yi = std::move(yRes); } void performIterationStep(storm::storage::SparseMatrix const& A, storm::solver::Multiplier const& multiplier, std::vector const& b) {