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

Public GIT Repository
Replace magic number 8.
[simgrid.git] / src / kernel / activity / MailboxImpl.cpp
index c84746a59b652e502c01cd8068982d2afafdc46e..f812f45522e4ed86566f6bfb7c9e18c44e813ee1 100644 (file)
@@ -92,12 +92,10 @@ CommImplPtr MailboxImpl::iprobe(int type, bool (*match_fun)(void*, void*, CommIm
   CommImplPtr this_comm;
   CommImpl::Type smx_type;
   if (type == 1) {
-    this_comm = CommImplPtr(new CommImpl());
-    this_comm->set_type(CommImpl::Type::SEND);
+    this_comm = CommImplPtr(new CommImpl(CommImpl::Type::SEND));
     smx_type  = CommImpl::Type::RECEIVE;
   } else {
-    this_comm = CommImplPtr(new CommImpl());
-    this_comm->set_type(CommImpl::Type::RECEIVE);
+    this_comm = CommImplPtr(new CommImpl(CommImpl::Type::RECEIVE));
     smx_type  = CommImpl::Type::SEND;
   }
   CommImplPtr other_comm = nullptr;