Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please sonar (protected fields) and coding standards (uppercase enum)
[simgrid.git] / src / surf / network_cm02.cpp
index 2f78a0d..0145c1f 100644 (file)
@@ -296,7 +296,7 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz
   }
   XBT_OUT();
 
-  simgrid::s4u::Link::on_communicate(action, src, dst);
+  simgrid::s4u::Link::on_communicate(*action, src, dst);
   return action;
 }
 
@@ -420,10 +420,10 @@ void NetworkCm02Link::set_latency(double value)
 
 void NetworkCm02Action::update_remains_lazy(double now)
 {
-  if (suspended_ != Action::SuspendStates::not_suspended)
+  if (not is_running())
     return;
 
-  double delta        = now - get_last_update();
+  double delta = now - get_last_update();
 
   if (get_remains_no_update() > 0) {
     XBT_DEBUG("Updating action(%p): remains was %f, last_update was: %f", this, get_remains_no_update(),