View | Details | Raw Unified | Return to bug 1939
Collapse All | Expand All

(-)a/src/core/model/object.cc (-7 / +8 lines)
 Lines 251-263    Link Here 
251
  NS_ASSERT (CheckLoose ());
251
  NS_ASSERT (CheckLoose ());
252
  NS_ASSERT (o->CheckLoose ());
252
  NS_ASSERT (o->CheckLoose ());
253
253
254
  if (DoGetObject (o->GetInstanceTypeId ()))
255
    {
256
      NS_FATAL_ERROR ("Object::AggregateObject(): "
257
                      "Multiple aggregation of objects of type " << 
258
                      o->GetInstanceTypeId ().GetName ());
259
    }
260
261
  Object *other = PeekPointer (o);
254
  Object *other = PeekPointer (o);
262
  // first create the new aggregate buffer.
255
  // first create the new aggregate buffer.
263
  uint32_t total = m_aggregates->n + other->m_aggregates->n;
256
  uint32_t total = m_aggregates->n + other->m_aggregates->n;
 Lines 274-279    Link Here 
274
  for (uint32_t i = 0; i < other->m_aggregates->n; i++)
267
  for (uint32_t i = 0; i < other->m_aggregates->n; i++)
275
    {
268
    {
276
      aggregates->buffer[m_aggregates->n+i] = other->m_aggregates->buffer[i];
269
      aggregates->buffer[m_aggregates->n+i] = other->m_aggregates->buffer[i];
270
      const TypeId typeId = other->m_aggregates->buffer[i]->GetInstanceTypeId ();
271
      if (DoGetObject (typeId))
272
        {
273
          NS_FATAL_ERROR ("Object::AggregateObject(): "
274
                          "Multiple aggregation of objects of type " <<
275
                          other->GetInstanceTypeId () <<
276
                          " on objects of type " << typeId);
277
        }
277
      UpdateSortedArray (aggregates, m_aggregates->n + i);
278
      UpdateSortedArray (aggregates, m_aggregates->n + i);
278
    }
279
    }
279
280

Return to bug 1939