use new NS_ASSERT macro rather than assert. this makes the code build on my machine.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user