Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Propagate const pointer (thx sonar).
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 29 Mar 2022 07:29:47 +0000 (09:29 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 29 Mar 2022 07:29:47 +0000 (09:29 +0200)
src/mc/explo/DFSExplorer.cpp
src/mc/explo/LivenessChecker.cpp

index 5e41cfa..6025a31 100644 (file)
@@ -252,7 +252,7 @@ void DFSExplorer::restore_state()
 {
   /* If asked to rollback on a state that has a snapshot, restore it */
   State* last_state = stack_.back().get();
-  if (auto* system_state = last_state->get_system_state()) {
+  if (const auto* system_state = last_state->get_system_state()) {
     Api::get().restore_state(system_state);
     on_restore_system_state_signal(last_state);
     return;
index edb3cf5..6cfd589 100644 (file)
@@ -102,7 +102,7 @@ void LivenessChecker::replay()
   /* Intermediate backtracking */
   if (_sg_mc_checkpoint > 0) {
     const Pair* pair = exploration_stack_.back().get();
-    if (auto* system_state = pair->graph_state->get_system_state()) {
+    if (const auto* system_state = pair->graph_state->get_system_state()) {
       Api::get().restore_state(system_state);
       return;
     }