convert use of <cassert> to "ns3/assert.h"

This commit is contained in:
Mathieu Lacage committed 2007-02-16 09:56:21 +01:00
1 parent 772bfdc614
commit b23ee44ad8
37 files changed
+150 -149

No files matched your search

+4 -4
View File
@@ -19,7 +19,7 @@
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
*/
#include <cassert>
#include "ns3/assert.h"
#include "ns3/header.h"
#include "ipv4-header.h"
@@ -137,13 +137,13 @@ Ipv4Header::IsDontFragment (void) const
void
Ipv4Header::SetFragmentOffset (uint16_t offset)
{
assert (!(offset & (~0x3fff)));
NS_ASSERT (!(offset & (~0x3fff)));
m_fragmentOffset = offset;
}
uint16_t
Ipv4Header::GetFragmentOffset (void) const
{
assert (!(m_fragmentOffset & (~0x3fff)));
NS_ASSERT (!(m_fragmentOffset & (~0x3fff)));
return m_fragmentOffset;
}
@@ -272,7 +272,7 @@ Ipv4Header::DeserializeFrom (Buffer::Iterator start)
uint8_t verIhl = i.ReadU8 ();
uint8_t ihl = verIhl & 0x0f;
uint16_t headerSize = ihl * 4;
assert ((verIhl >> 4) == 4);
NS_ASSERT ((verIhl >> 4) == 4);
m_tos = i.ReadU8 ();
uint16_t size = i.ReadNtohU16 ();
m_payloadSize = size - headerSize;