[Avida-cvs] [avida-svn] r997 - branches/coopcomm/source/main

dknoester at myxo.css.msu.edu dknoester at myxo.css.msu.edu
Tue Sep 26 11:30:04 PDT 2006


Author: dknoester
Date: 2006-09-26 14:30:04 -0400 (Tue, 26 Sep 2006)
New Revision: 997

Modified:
   branches/coopcomm/source/main/cOrganism.cc
Log:
Fixed compile errors related to r995.

Modified: branches/coopcomm/source/main/cOrganism.cc
===================================================================
--- branches/coopcomm/source/main/cOrganism.cc	2006-09-26 18:16:59 UTC (rev 996)
+++ branches/coopcomm/source/main/cOrganism.cc	2006-09-26 18:30:04 UTC (rev 997)
@@ -550,7 +550,8 @@
     // by using pointers.  this is number two; if we need another sorted list of 
     // messages, it'll be time to refactor.
     m_sent_messages.push_back(msg);
-    m_sorted_sent_messages.insert(std::make_pair(msg.GetData(), msg));
+    std::pair<t_sorted_messages::iterator, bool> inserted_msg = 
+      m_sorted_sent_messages.insert(std::make_pair(msg.GetData(), msg));
 
     int new_size = m_sent_messages.size();
     m_world->GetStats().UpdateSentSize(old_size, new_size);
@@ -599,8 +600,8 @@
     }
 
     // See comments above.
-    m_sent_messages.back()->SetReceiver(NULL);
-    m_sorted_sent_messages[msg.GetData()].SetReceiver(NULL);
+    m_sent_messages.back().SetReceiver(NULL);
+    inserted_msg.first->second.SetReceiver(NULL);
     return true;
   } else {
     return false;




More information about the Avida-cvs mailing list