use new NS_ASSERT macro rather than assert. this makes the code build on my machine.

This commit is contained in:
Mathieu Lacage
2007-02-19 10:23:50 +01:00
parent 847aca86cf
commit 3326fdba35
2 changed files with 10 additions and 8 deletions

View File

@@ -19,6 +19,7 @@
#include <string>
#include "ns3/debug.h"
#include "ns3/assert.h"
#include "ns3/packet.h"
#include "ns3/drop-tail.h"
#include "ns3/layer-connector.h"
@@ -123,14 +124,14 @@ FakePhysicalLayer::LowerDoNotify (LayerConnectorUpper *upper)
NS_DEBUG_UNCOND("FakePhysicalLayer::LowerDoNotify (): Starting pull")
assert(m_upperPartner);
NS_ASSERT(m_upperPartner);
m_upperPartner->UpperPull(p);
m_dtqOutbound.Enque(p);
NS_DEBUG_UNCOND("FakePhysicalLayer::LowerDoNotify (): Got bits, Notify lower")
assert(m_lowerPartner);
NS_ASSERT(m_lowerPartner);
return m_lowerPartner->LowerNotify(this);
}
@@ -139,7 +140,7 @@ FakePhysicalLayer::UpperDoSendUp (Packet &p)
{
NS_DEBUG_UNCOND("FakePhysicalLayer::UpperDoSendUp (" << &p << ")")
assert(m_upperPartner);
NS_ASSERT(m_upperPartner);
return m_upperPartner->UpperSendUp(p);
}

View File

@@ -22,6 +22,7 @@
*/
#include "ns3/debug.h"
#include "ns3/assert.h"
#include "layer-connector.h"
NS_DEBUG_COMPONENT_DEFINE ("LayerConnector");
@@ -52,7 +53,7 @@ LayerConnectorUpper::DoConnectToLower (LayerConnectorLower &partner)
NS_DEBUG("LayerConnectorUpper::DoConnectToLower (" << &partner << ")")
m_lowerPartner = &partner;
assert(m_lowerPartner);
NS_ASSERT (m_lowerPartner);
return true;
}
@@ -77,7 +78,7 @@ LayerConnectorUpper::UpperNotify ()
{
NS_DEBUG("LayerConnectorUpper::UpperNotify ()")
assert(m_lowerPartner);
NS_ASSERT (m_lowerPartner);
return m_lowerPartner->LowerNotify(this);
}
@@ -105,7 +106,7 @@ LayerConnectorLower::DoConnectToUpper (LayerConnectorUpper &partner)
NS_DEBUG("LayerConnectorLower::DoConnectToUpper (" << &partner << ")")
m_upperPartner = &partner;
assert(m_upperPartner);
NS_ASSERT (m_upperPartner);
return true;
}
@@ -114,7 +115,7 @@ LayerConnectorLower::LowerSendUp (Packet &p)
{
NS_DEBUG("LayerConnectorLower::LowerSendUp (" << &p << ")")
assert(m_upperPartner);
NS_ASSERT (m_upperPartner);
return m_upperPartner->UpperSendUp(p);
}
@@ -123,7 +124,7 @@ LayerConnectorLower::LowerPull (Packet &p)
{
NS_DEBUG("LayerConnectorLower::LowerPull (" << &p << ")")
assert(m_upperPartner);
NS_ASSERT (m_upperPartner);
return m_upperPartner->UpperPull(p);
}