src/simulator/simulator.cc
changeset 286 57e6a2006962
parent 213 1e6d6776b284
child 336 9dd9a53188bc
--- a/src/simulator/simulator.cc	Fri Feb 16 09:42:53 2007 +0100
+++ b/src/simulator/simulator.cc	Fri Feb 16 09:56:21 2007 +0100
@@ -24,7 +24,7 @@
 #include "event-impl.h"
 
 #include <math.h>
-#include <cassert>
+#include "ns3/assert.h"
 #include <fstream>
 #include <list>
 #include <vector>
@@ -147,7 +147,7 @@
 uint64_t
 SimulatorPrivate::NextNs (void) const
 {
-  assert (!m_events->IsEmpty ());
+  NS_ASSERT (!m_events->IsEmpty ());
   Scheduler::EventKey nextKey = m_events->PeekNextKey ();
   return nextKey.m_ns;
 }
@@ -179,14 +179,14 @@
 void 
 SimulatorPrivate::StopAt (Time const &at)
 {
-  assert (at.IsPositive ());
+  NS_ASSERT (at.IsPositive ());
   m_stopAt = at.GetNanoSeconds ();
 }
 EventId
 SimulatorPrivate::Schedule (Time const &time, EventImpl *event)
 {
-  assert (time.IsPositive ());
-  assert (time >= NanoSeconds (m_currentNs));
+  NS_ASSERT (time.IsPositive ());
+  NS_ASSERT (time >= NanoSeconds (m_currentNs));
   uint64_t ns = (uint64_t) time.GetNanoSeconds ();
   Scheduler::EventKey key = {ns, m_uid};
   if (m_logEnable) 
@@ -296,7 +296,7 @@
 void 
 Simulator::SetExternal (SchedulerFactory const*factory)
 {
-  assert (factory != 0);
+  NS_ASSERT (factory != 0);
   m_schedFactory = factory;
   m_listType = EXTERNAL;
 }
@@ -326,7 +326,7 @@
           events = m_schedFactory->Create ();
       default: // not reached
           events = 0;
-          assert (false); 
+          NS_ASSERT (false); 
           break;
       }
       m_priv = new SimulatorPrivate (events);