Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://framagit.org/simgrid/simgrid
[simgrid.git] / src / mc / api / ActorState.hpp
index 6af8bcc..eda2808 100644 (file)
@@ -53,7 +53,7 @@ class ActorState {
    * This means there may be a way to store the list once and apply differences
    * rather than repeating elements frequently.
    */
-  std::vector<std::unique_ptr<Transition>> pending_transitions_;
+  std::vector<std::shared_ptr<Transition>> pending_transitions_;
 
   /* Possible exploration status of an actor transition in a state.
    * Either the checker did not consider the transition, or it was considered and still to do, or considered and
@@ -86,7 +86,7 @@ class ActorState {
 public:
   ActorState(aid_t aid, bool enabled, unsigned int max_consider) : ActorState(aid, enabled, max_consider, {}) {}
 
-  ActorState(aid_t aid, bool enabled, unsigned int max_consider, std::vector<std::unique_ptr<Transition>> transitions)
+  ActorState(aid_t aid, bool enabled, unsigned int max_consider, std::vector<std::shared_ptr<Transition>> transitions)
       : pending_transitions_(std::move(transitions)), aid_(aid), max_consider_(max_consider), enabled_(enabled)
   {
   }
@@ -94,7 +94,7 @@ public:
   unsigned int do_consider()
   {
     if (max_consider_ <= times_considered_ + 1)
-      set_done();
+      mark_done();
     return times_considered_++;
   }
   unsigned int get_times_considered() const { return times_considered_; }
@@ -112,7 +112,7 @@ public:
     this->state_            = InterleavingType::todo;
     this->times_considered_ = 0;
   }
-  void set_done() { this->state_ = InterleavingType::done; }
+  void mark_done() { this->state_ = InterleavingType::done; }
 
   inline Transition* get_transition(unsigned times_considered)
   {