Changeset 7129 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Feb 13, 2006, 1:30:31 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/coord/p_node.cc
r7126 r7129 82 82 PRINTF(4)("delete %s::%s\n", this->getClassName(), this->getName()); 83 83 // remove the Node, delete it's children (if required). 84 std::list<PNode*>::iterator tmp = this->children.begin();85 84 std::list<PNode*>::iterator deleteNode; 86 85 unsigned int size; 87 86 while(!this->children.empty()) 88 87 { 89 tmp = this->children.begin(); 90 //while (tmp != this->children.end()) 88 deleteNode = this->children.begin(); 89 size = this->children.size(); 90 if ((this->parentMode & PNODE_PROHIBIT_CHILD_DELETE) || 91 ((*deleteNode)->parentMode & PNODE_PROHIBIT_DELETE_WITH_PARENT)) 91 92 { 92 deleteNode = tmp; 93 tmp++; 94 size = this->children.size(); 95 if ((this->parentMode & PNODE_PROHIBIT_CHILD_DELETE) || 96 ((*deleteNode)->parentMode & PNODE_PROHIBIT_DELETE_WITH_PARENT)) 93 if (this == PNode::nullParent && (*deleteNode)->parentMode & PNODE_REPARENT_TO_NULL) 97 94 { 98 if (this == PNode::nullParent && (*deleteNode)->parentMode & PNODE_REPARENT_TO_NULL) 99 { 100 PRINTF(4)("%s::%s deletes %s::%s\n", 101 this->getClassName(), this->getName(), 102 (*deleteNode)->getClassName(), (*deleteNode)->getName()); 103 delete (*deleteNode); 104 } 105 else 106 { 107 PRINTF(4)("%s::%s reparents %s::%s\n", 108 this->getClassName(), this->getName(), 109 (*deleteNode)->getClassName(), (*deleteNode)->getName()); 110 (*deleteNode)->reparent(); 111 } 95 PRINTF(4)("%s::%s deletes %s::%s\n", 96 this->getClassName(), this->getName(), 97 (*deleteNode)->getClassName(), (*deleteNode)->getName()); 98 delete (*deleteNode); 112 99 } 113 100 else 114 101 { 115 PRINTF(4)("%s::%s deletes PNode:%s::%s\n",116 this->getClassName(), this->getName(),117 (*deleteNode)->getClassName(), (*deleteNode)->getName());118 delete (*deleteNode);102 PRINTF(4)("%s::%s reparents %s::%s\n", 103 this->getClassName(), this->getName(), 104 (*deleteNode)->getClassName(), (*deleteNode)->getName()); 105 (*deleteNode)->reparent(); 119 106 } 120 //if (size <= this->children.size()) break; 107 } 108 else 109 { 110 PRINTF(4)("%s::%s deletes PNode: %s::%s\n", 111 this->getClassName(), this->getName(), 112 (*deleteNode)->getClassName(), (*deleteNode)->getName()); 113 delete (*deleteNode); 121 114 } 122 115 }
Note: See TracChangeset
for help on using the changeset viewer.