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