]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/activity/CommImpl.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into 'master'
[simgrid.git] / src / kernel / activity / CommImpl.cpp
index 91e3f17297536ff03552e783c97b25b16f42fc50..d2136944e70549a9d9994be27daa011837986bdd 100644 (file)
@@ -77,7 +77,7 @@ XBT_PRIVATE simgrid::kernel::activity::ActivityImplPtr simcall_HANDLER_comm_isen
     other_comm->clean_fun = clean_fun;
   } else {
     other_comm->clean_fun = nullptr;
-    src_proc->activities_.push_back(other_comm);
+    src_proc->activities_.emplace_back(other_comm);
   }
 
   /* Setup the communication synchro */
@@ -160,7 +160,7 @@ simcall_HANDLER_comm_irecv(smx_simcall_t /*simcall*/, smx_actor_t receiver, smx_
       other_comm->state_ = simgrid::kernel::activity::State::READY;
       other_comm->set_type(simgrid::kernel::activity::CommImpl::Type::READY);
     }
-    receiver->activities_.push_back(other_comm);
+    receiver->activities_.emplace_back(other_comm);
   }
 
   /* Setup communication synchro */
@@ -309,7 +309,7 @@ void simcall_HANDLER_comm_waitany(smx_simcall_t simcall, simgrid::kernel::activi
   }
 
   if (timeout < 0.0) {
-    simcall->timeout_cb_ = NULL;
+    simcall->timeout_cb_ = nullptr;
   } else {
     simcall->timeout_cb_ = simgrid::simix::Timer::set(SIMIX_get_clock() + timeout, [simcall]() {
       simcall->timeout_cb_ = nullptr;