Changeset 3668 in orxonox.OLD for orxonox/trunk/src/lib
- Timestamp:
- Mar 30, 2005, 11:40:16 AM (20 years ago)
- Location:
- orxonox/trunk/src/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/coord/p_node.cc
r3662 r3668 336 336 if( pNode->parent != NULL ) 337 337 { 338 PRINTF( 2)("PNode::addChild() - reparenting node: removing it and adding it again\n");338 PRINTF(3)("PNode::addChild() - reparenting node: removing it and adding it again\n"); 339 339 pNode->parent->children->remove(pNode); 340 340 } … … 368 368 NullParent* nullParent = NullParent::getInstance(); 369 369 370 PNode* pn = this->children->enumerate(); 370 tIterator<PNode>* iterator = this->children->getIterator(); 371 PNode* pn = iterator->nextElement(); 372 371 373 while( pn != NULL) 372 374 { 373 375 //this->children->remove(pn); 374 376 nullParent->addChild(pn, pn->getMode()); 375 pn = this->children->nextElement(); 376 } 377 pn = iterator->nextElement(); 378 } 379 delete iterator; 380 //this->parent->removeChild(this); 377 381 } 378 382 -
orxonox/trunk/src/lib/util/list.h
r3661 r3668 75 75 this->currentEl = startElement; 76 76 this->firstEl = startElement; 77 this->counter = -1; 77 if( this->firstEl != NULL) 78 this->counter = -1; 79 else 80 this->counter = 0; 78 81 } 79 82 … … 89 92 inline T* tIterator<T>::nextElement () 90 93 { 94 /* 91 95 this->counter++; 92 96 if( this->counter == 0) 93 97 return this->firstEl->curr; 94 95 if( this->currentEl->next == NULL || this->currentEl == NULL) 98 */ 99 100 if( this->currentEl == NULL) 96 101 return NULL; 97 102 103 listElement<T>* tmp = this->currentEl; 98 104 this->currentEl = this->currentEl->next; 99 return t his->currentEl->curr;105 return tmp->curr; 100 106 } 101 107 … … 104 110 template<class T> class tList 105 111 { 106 107 112 public: 108 113 tList (); … … 188 193 else this->currentEl->next->prev = this->currentEl->prev; 189 194 190 te = this->currentEl->next; // for what am i doing this?195 //te = this->currentEl->next; // for what am i doing this? 191 196 delete this->currentEl; 192 this->currentEl = te; 197 //this->currentEl = te; 198 this->currentEl = NULL; 193 199 this->size--; 194 200 return;
Note: See TracChangeset
for help on using the changeset viewer.