Fix to the FindSubTable function. Iterator is not erased, but now the front object is put to the position that is replaced.

This commit is contained in:
(no author)
2011-01-26 22:29:47 +00:00
parent cba3152d9a
commit 4d5e10e472
@@ -125,9 +125,9 @@ class TableExchange {
// Put the found subtable to the end.
SubTableType subtable_copy = *it;
received_subtables_[process_id].erase(it);
received_subtables_[process_id].push_back(SubTableType());
received_subtables_[process_id].back() = subtable_copy;
(*it) = received_subtables_[process_id].front();
received_subtables_[process_id].pop_front();
received_subtables_[process_id].push_back(subtable_copy);
return &(received_subtables_[process_id].back());
}
}