From 4d5e10e4729feb3ee2a70df9ed6b442a2fb53e5b Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@9d5b8971-822b-0410-80eb-d18c1038ef23> Date: Wed, 26 Jan 2011 22:29:47 +0000 Subject: [PATCH] Fix to the FindSubTable function. Iterator is not erased, but now the front object is put to the position that is replaced. --- .../dongryel/thesis_research/core/parallel/table_exchange.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fastlib/trunk/contrib/dongryel/thesis_research/core/parallel/table_exchange.h b/fastlib/trunk/contrib/dongryel/thesis_research/core/parallel/table_exchange.h index 531951c553..20a2709fb6 100644 --- a/fastlib/trunk/contrib/dongryel/thesis_research/core/parallel/table_exchange.h +++ b/fastlib/trunk/contrib/dongryel/thesis_research/core/parallel/table_exchange.h @@ -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()); } }