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