src/simulator/scheduler-map.cc
changeset 196 9d243651d00c
parent 194 882aa1fc50fd
child 231 8516b1203fbd
--- a/src/simulator/scheduler-map.cc	Tue Dec 12 14:41:39 2006 +0100
+++ b/src/simulator/scheduler-map.cc	Tue Dec 12 14:41:52 2006 +0100
@@ -49,16 +49,20 @@
  * - transitivity: f(x,y) and f(y,z) => f(x,z)
  */
 bool
-SchedulerMap::EventKeyCompare::operator () (struct EventKey a, struct EventKey b)
+SchedulerMap::EventKeyCompare::operator () (struct EventKey const&a, struct EventKey const&b)
 {
   if (a.m_ns < b.m_ns) 
     {
       return true;
     } 
-  else if (a.m_ns == b.m_ns && a.m_uid < b.m_uid) 
+  else if (a.m_ns > b.m_ns)
+    {
+      return false;
+    } 
+  else if (a.m_uid < b.m_uid)
     {
       return true;
-    } 
+    }
   else 
     {
       return false;