Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://framagit.org/simgrid/simgrid
[simgrid.git] / src / mc / api / strategy / MinMatchComm.hpp
index 7393f4a..7d06c9d 100644 (file)
@@ -55,18 +55,18 @@ public:
       const Transition* transition = actor.get_transition(actor.get_times_considered()).get();
 
       if (auto const* cast_recv = dynamic_cast<CommRecvTransition const*>(transition)) {
-        if ((mailbox_.count(cast_recv->get_mailbox()) > 0 && mailbox_.at(cast_recv->get_mailbox()) <= 0) ||
-            mailbox_.count(cast_recv->get_mailbox()) == 0)
-          aid_value--; // This means we don't have waiting recv corresponding to this recv
-        else
-          aid_value++;
+            if ((mailbox_.count(cast_recv->get_mailbox()) > 0 && mailbox_.at(cast_recv->get_mailbox()) <= 0) ||
+                mailbox_.count(cast_recv->get_mailbox()) == 0)
+              aid_value--; // This means we don't have waiting recv corresponding to this recv
+            else
+              aid_value++;
       }
       if (auto const* cast_send = dynamic_cast<CommSendTransition const*>(transition)) {
-        if ((mailbox_.count(cast_send->get_mailbox()) > 0 && mailbox_.at(cast_send->get_mailbox()) >= 0) ||
-            mailbox_.count(cast_send->get_mailbox()) == 0)
-          aid_value--;
-        else
-          aid_value++;
+            if ((mailbox_.count(cast_send->get_mailbox()) > 0 && mailbox_.at(cast_send->get_mailbox()) >= 0) ||
+                mailbox_.count(cast_send->get_mailbox()) == 0)
+              aid_value--;
+            else
+              aid_value++;
       }
 
       if (aid_value < min_found.second)