From 122c2888eb1f5b859728c9d31bdd1121072e1628 Mon Sep 17 00:00:00 2001 From: vivek-shankar Date: Fri, 27 Jan 2017 23:36:53 -0500 Subject: [PATCH] readdition of map entry cycling --- src/CommunicationManager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/CommunicationManager.cpp b/src/CommunicationManager.cpp index d3d04b6..4b7aae6 100644 --- a/src/CommunicationManager.cpp +++ b/src/CommunicationManager.cpp @@ -400,11 +400,11 @@ inline void CommunicationManager::Check_In_Messages_and_Transfer_To_Topics() } else if (header[1]==cur_checksum) { std::map< std::size_t, std::shared_ptr >::iterator it = multi_msgs.find(header[2]); - //if(it!=multi_msgs.end()){ - //multi_msgs.erase(it); - //multi_msgs.insert(make_pair(header[2], in_message)); - //} - if(it==multi_msgs.end()){ + if(it!=multi_msgs.end()){ + multi_msgs.erase(it); + multi_msgs.insert(make_pair(header[2], in_message)); + } + else{ multi_msgs.insert(make_pair(header[2], in_message)); counter++; }