Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
s4u: use size_t for payload size instead of int and double
[simgrid.git] / include / simgrid / s4u / Activity.hpp
index 57ab037..67fcbd5 100644 (file)
@@ -25,7 +25,7 @@ XBT_PUBLIC_CLASS Activity {
 
 protected:
   Activity()  = default;
-  ~Activity() = default;
+  virtual ~Activity() = default;
 
 public:
   Activity(Activity const&) = delete;
@@ -49,11 +49,11 @@ public:
   e_s4u_activity_state_t getState() {return state_;}
 
   /** Get the remaining amount of work that this Activity entails. When it's 0, it's done. */
-  double getRemains();
+  size_t getRemains();
   /** Set the [remaining] amount of work that this Activity will entail
    *
    * It is forbidden to change the amount of work once the Activity is started */
-  void setRemains(double remains);
+  void setRemains(size_t remains);
 
   /** Put some user data onto the Activity */
   void setUserData(void *data) {userData_=data;}
@@ -63,7 +63,7 @@ public:
 private:
   simgrid::kernel::activity::ActivityImplPtr pimpl_ = nullptr;
   e_s4u_activity_state_t state_ = inited;
-  double remains_ = 0;
+  size_t remains_                                   = 0;
   void *userData_ = nullptr;
 }; // class