Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill redundant blank lines (codefactor.io)
[simgrid.git] / src / mc / api / State.cpp
index 1ba81a2..5ca3182 100644 (file)
@@ -4,7 +4,6 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "src/mc/api/State.hpp"
-#include "src/mc/api.hpp"
 #include "src/mc/mc_config.hpp"
 
 #include <boost/range/algorithm.hpp>
@@ -15,15 +14,14 @@ namespace simgrid::mc {
 
 long State::expended_states_ = 0;
 
-State::State(Session& session) : num_(++expended_states_)
+State::State(RemoteApp& remote_app) : num_(++expended_states_)
 {
-  session.get_actors_status(actors_to_run_);
+  remote_app.get_actors_status(actors_to_run_);
 
   transition_.reset(new Transition());
   /* Stateful model checking */
   if ((_sg_mc_checkpoint > 0 && (num_ % _sg_mc_checkpoint == 0)) || _sg_mc_termination) {
-    auto snapshot_ptr = Api::get().take_snapshot(num_);
-    system_state_     = std::shared_ptr<simgrid::mc::Snapshot>(snapshot_ptr);
+    system_state_ = std::make_shared<simgrid::mc::Snapshot>(num_);
   }
 }