Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
these static casts are useless
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 15 Jun 2017 00:31:21 +0000 (02:31 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 15 Jun 2017 00:31:21 +0000 (02:31 +0200)
src/simix/ActorImpl.cpp

index 0d207a8..2efe7b7 100644 (file)
@@ -93,7 +93,7 @@ void SIMIX_process_cleanup(smx_actor_t process)
   xbt_os_mutex_acquire(simix_global->mutex);
 
   /* cancel non-blocking communications */
   xbt_os_mutex_acquire(simix_global->mutex);
 
   /* cancel non-blocking communications */
-  smx_activity_t synchro = static_cast<smx_activity_t>(process->comms.front());
+  smx_activity_t synchro = process->comms.front();
   while (not process->comms.empty()) {
     simgrid::kernel::activity::CommImplPtr comm =
         boost::static_pointer_cast<simgrid::kernel::activity::CommImpl>(synchro);
   while (not process->comms.empty()) {
     simgrid::kernel::activity::CommImplPtr comm =
         boost::static_pointer_cast<simgrid::kernel::activity::CommImpl>(synchro);
@@ -119,7 +119,7 @@ void SIMIX_process_cleanup(smx_actor_t process)
       xbt_die("Communication synchro %p is in my list but I'm not the sender nor the receiver", synchro);
     }
     process->comms.pop_front();
       xbt_die("Communication synchro %p is in my list but I'm not the sender nor the receiver", synchro);
     }
     process->comms.pop_front();
-    synchro = static_cast<smx_activity_t>(process->comms.front());
+    synchro = process->comms.front();
     comm->cancel();
   }
 
     comm->cancel();
   }