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);
#ifndef COMMUNICATOR_H
#define COMMUNICATOR_H
-#include <list>
+#include <vector>
#include <msg/msg.h>
#include "hostdata.h"
#include "messages.h"
const hostdata* host;
// List of pending send communications
- std::list<msg_comm_t> sent_comm;
+ typedef std::vector<msg_comm_t> sent_comm_type;
+ sent_comm_type sent_comm;
// Queue of received messages
message_queue received;