We need to make sure that the uid of the first event generated is different from the uid of the simulator when no events have yet been run.
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Fri, 15 Dec 2006 10:01:23 +0100
changeset 200 46031a283b0d
parent 199 8c6ae79c3641
child 201 b7635c5d5bdf
We need to make sure that the uid of the first event generated is different from the uid of the simulator when no events have yet been run.
src/simulator/simulator.cc
--- a/src/simulator/simulator.cc	Wed Dec 13 15:20:03 2006 +0100
+++ b/src/simulator/simulator.cc	Fri Dec 15 10:01:23 2006 +0100
@@ -92,7 +92,10 @@
   m_stop = false;
   m_stopAt = 0;
   m_events = events;
-  m_uid = 0;    
+  // uids are allocated from 1.
+  m_uid = 1; 
+  // before ::Run is entered, the m_currentUid will be zero
+  m_currentUid = 0;
   m_logEnable = false;
   m_currentNs = 0;
 }