avoid direct access to Object::m_tid. Use ObjectBase::GetInstanceTypeId instead.
--- a/src/core/object.cc Tue Jul 08 10:19:34 2008 -0700
+++ b/src/core/object.cc Tue Jul 08 14:27:45 2008 -0700
@@ -113,7 +113,7 @@
const Object *currentObject = this;
do {
NS_ASSERT (currentObject != 0);
- TypeId cur = currentObject->m_tid;
+ TypeId cur = currentObject->GetInstanceTypeId ();
while (cur != tid && cur != Object::GetTypeId ())
{
cur = cur.GetParent ();
@@ -146,10 +146,11 @@
NS_ASSERT (CheckLoose ());
NS_ASSERT (o->CheckLoose ());
- if (DoGetObject (o->m_tid))
+ if (DoGetObject (o->GetInstanceTypeId ()))
{
NS_FATAL_ERROR ("Object::AggregateObject(): "
- "Multiple aggregation of objects of type " << o->m_tid.GetName ());
+ "Multiple aggregation of objects of type " <<
+ o->GetInstanceTypeId ().GetName ());
}
Object *other = PeekPointer (o);
--- a/src/core/object.h Tue Jul 08 10:19:34 2008 -0700
+++ b/src/core/object.h Tue Jul 08 14:27:45 2008 -0700
@@ -379,7 +379,7 @@
Ptr<T> CopyObject (Ptr<T> object)
{
Ptr<T> p = Ptr<T> (new T (*PeekPointer (object)), false);
- NS_ASSERT (p->m_tid == object->m_tid);
+ NS_ASSERT (p->GetInstanceTypeId () == object->GetInstanceTypeId ());
return p;
}
@@ -387,7 +387,7 @@
Ptr<T> CopyObject (Ptr<const T> object)
{
Ptr<T> p = Ptr<T> (new T (*PeekPointer (object)), false);
- NS_ASSERT (p->m_tid == object->m_tid);
+ NS_ASSERT (p->GetInstanceTypeId () == object->GetInstanceTypeId ());
return p;
}