X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/0872290a992e2f6db574c18ac36d1987318d477d..9936cb5ae7eaf8907cbff5722b206087b18053ca:/communicator.cpp 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);