X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/0872290a992e2f6db574c18ac36d1987318d477d..e9c3c48dfa8ea8ebddb2550a1cdd9981c8874bf8:/communicator.cpp?ds=inline diff --git a/communicator.cpp b/communicator.cpp index daf1434..ce0e79f 100644 --- a/communicator.cpp +++ b/communicator.cpp @@ -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);