Changeset 9755 in orxonox.OLD for branches/new_class_id/src/lib/coord
- Timestamp:
- Sep 17, 2006, 11:33:22 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/coord/p_node.cc
r9715 r9755 78 78 PNode::~PNode () 79 79 { 80 PRINTF(4)("delete %s::%s\n", this->getClassCName(), this->getCName()); 80 PRINTF(0)("delete %s::%s\n", this->getClassCName(), this->getCName()); 81 this->debugNode(0); 81 82 // remove the Node, delete it's children (if required). 82 std::list<PNode*>::iterator deleteNode;83 unsigned int size;84 83 while(!this->children.empty()) 85 84 { 86 deleteNode = this->children.begin(); 87 size = this->children.size(); 85 PNode* deleteNode = this->children.front(); 88 86 if ((this->parentMode & PNODE_PROHIBIT_CHILD_DELETE) || 89 ( (*deleteNode)->parentMode & PNODE_PROHIBIT_DELETE_WITH_PARENT))87 (deleteNode->parentMode & PNODE_PROHIBIT_DELETE_WITH_PARENT)) 90 88 { 91 if (this == PNode::nullParent && (*deleteNode)->parentMode & PNODE_REPARENT_TO_NULL)89 if (this == PNode::nullParent && deleteNode->parentMode & PNODE_REPARENT_TO_NULL) 92 90 { 93 91 PRINTF(4)("%s::%s deletes %s::%s\n", 94 92 this->getClassCName(), this->getCName(), 95 (*deleteNode)->getClassCName(), (*deleteNode)->getCName());96 delete (*deleteNode);93 deleteNode->getClassCName(), deleteNode->getCName()); 94 delete deleteNode; 97 95 } 98 96 else … … 100 98 PRINTF(4)("%s::%s reparents %s::%s\n", 101 99 this->getClassCName(), this->getCName(), 102 (*deleteNode)->getClassCName(), (*deleteNode)->getCName());103 (*deleteNode)->reparent();100 deleteNode->getClassCName(), deleteNode->getCName()); 101 deleteNode->reparent(); 104 102 } 105 103 } … … 108 106 PRINTF(4)("%s::%s deletes PNode: %s::%s\n", 109 107 this->getClassCName(), this->getCName(), 110 (*deleteNode)->getClassCName(), (*deleteNode)->getCName());111 delete (*deleteNode);108 deleteNode->getClassCName(), deleteNode->getCName()); 109 delete deleteNode; 112 110 } 113 111 }
Note: See TracChangeset
for help on using the changeset viewer.