From 90c325a38f200cab64acce2f998982cbac73cc2e Mon Sep 17 00:00:00 2001 From: Jip Spel Date: Mon, 10 Sep 2018 10:10:33 +0200 Subject: [PATCH] Make nodes variable before using it --- src/storm-pars/analysis/Lattice.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/storm-pars/analysis/Lattice.cpp b/src/storm-pars/analysis/Lattice.cpp index a7e5acfe5..001873698 100644 --- a/src/storm-pars/analysis/Lattice.cpp +++ b/src/storm-pars/analysis/Lattice.cpp @@ -50,8 +50,9 @@ namespace storm { nodes.at(i) = bottom; } + auto oldNodes = lattice->getNodes(); // Create all nodes - for (auto itr = lattice->getNodes().begin(); itr != lattice->getNodes().end(); ++itr) { + for (auto itr = oldNodes.begin(); itr != oldNodes.end(); ++itr) { Node* oldNode = (*itr); if (oldNode != nullptr) { Node *newNode = new Node(); @@ -65,7 +66,7 @@ namespace storm { } // Create transitions - for (auto itr = lattice->getNodes().begin(); itr != lattice->getNodes().end(); ++itr) { + for (auto itr = oldNodes.begin(); itr != oldNodes.end(); ++itr) { Node* oldNode = (*itr); if (oldNode != nullptr) { auto state = (*itr)->states.getNextSetIndex(0);