Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9783 in orxonox.OLD for branches/new_class_id/src/lib/coord


Ignore:
Timestamp:
Sep 21, 2006, 7:10:42 PM (18 years ago)
Author:
bensch
Message:

orxonox/new_class_id: more implementation on Resources

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/coord/p_node.cc

    r9770 r9783  
    8080  PRINTF(4)("delete %s::%s\n", this->getClassCName(), this->getCName());
    8181  // remove the Node, delete it's children (if required).
     82  PNode* last = NULL;
     83  this->debugNode(0);
     84
    8285  while(!this->children.empty())
    8386  {
    8487    PNode* deleteNode = this->children.front();
     88    if (deleteNode == last)
     89    {
     90      PRINTF(1)("Node same as last that was tried to be deleted. FORCE delete of %p\n", deleteNode);
     91      delete deleteNode;
     92      continue;
     93    }
    8594    if ((this->parentMode & PNODE_PROHIBIT_CHILD_DELETE) ||
    8695        (deleteNode->parentMode & PNODE_PROHIBIT_DELETE_WITH_PARENT))
     
    108117      delete deleteNode;
    109118    }
     119    last = deleteNode;
    110120  }
    111121
     
    913923  int childNodeCount = 0;
    914924  this->countChildNodes(childNodeCount);
    915 
     925  printf("%p:", this);
    916926  PRINT(0)("PNode(%s::%s) - absCoord: (%0.2f, %0.2f, %0.2f), relCoord(%0.2f, %0.2f, %0.2f), direction(%0.2f, %0.2f, %0.2f) - %s - %d childs\n",
    917927           this->getClassCName(),
Note: See TracChangeset for help on using the changeset viewer.