Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Dynamic cast without checking result is slow and useless. Use static cast.
[simgrid.git] / src / kernel / activity / MailboxImpl.cpp
index 8ad9e02..5060404 100644 (file)
@@ -132,7 +132,7 @@ CommImplPtr MailboxImpl::find_matching_comm(CommImpl::Type type, int (*match_fun
     deque = &comm_queue_;
 
   for (auto it = deque->begin(); it != deque->end(); it++) {
-    CommImplPtr comm = boost::dynamic_pointer_cast<CommImpl>(std::move(*it));
+    CommImplPtr comm = boost::static_pointer_cast<CommImpl>(std::move(*it));
 
     if (comm->type == CommImpl::Type::SEND) {
       other_user_data = comm->src_data_;