]> AND Private Git Repository - loba.git/blobdiff - communicator.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Add a catchall case in exception handler.
[loba.git] / communicator.cpp
index daf14348393761cded88e166bbdfd4d313e4622e..ce0e79f15ccaa75a8f1ecfe5932e3ac69adfd241 100644 (file)
@@ -60,7 +60,10 @@ void communicator::send(const char* dest, message* msg)
 
 void communicator::flush(bool wait)
 {
-    sent_comm.remove_if(comm_test_n_destroy);
+    sent_comm_type::iterator bound;
+    bound = std::remove_if(sent_comm.begin(), sent_comm.end(),
+                           comm_test_n_destroy);
+    sent_comm.erase(bound, sent_comm.end());
     if (wait && !sent_comm.empty()) {
         msg_comm_t comms[sent_comm.size()];
         std::copy(sent_comm.begin(), sent_comm.end(), comms);