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:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user