Changeset 5214 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Sep 21, 2005, 8:46:28 PM (19 years ago)
- Location:
- trunk/src/lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/coord/p_node.cc
r5211 r5214 78 78 PNode::~PNode () 79 79 { 80 tIterator<PNode>* iterator = this->children->getIterator();81 PNode* pn = iterator->firstElement();82 while( pn != NULL)83 {84 delete pn;85 pn = iterator->nextElement();86 }87 delete iterator;88 /* this deletes all children in the list */89 delete this->children;90 80 if (this->parent) 91 81 this->parent->removeChild(this); 92 82 else 83 { 84 tIterator<PNode>* iterator = this->children->getIterator(); 85 PNode* pn = iterator->firstElement(); 86 while( pn != NULL) 87 { 88 delete pn; 89 pn = iterator->nextElement(); 90 } 91 delete iterator; 92 /* this deletes all children in the list */ 93 } 94 delete this->children; 93 95 if (this->toCoordinate != NULL) 94 96 delete this->toCoordinate; … … 422 424 void PNode::removeChild (PNode* child) 423 425 { 424 child->remove(); 425 this->children->remove(child); 426 child->parent = NULL; 426 if (child != NULL) 427 { 428 child->remove(); 429 // this->children->remove(child); 430 // child->parent = NULL; 431 } 427 432 } 428 433 … … 434 439 void PNode::remove() 435 440 { 436 NullParent* nullParent = NullParent::getInstance();437 438 441 tIterator<PNode>* iterator = this->children->getIterator(); 439 442 PNode* pn = iterator->firstElement(); … … 441 444 while( pn != NULL) 442 445 { 443 nullParent->addChild(pn, pn->getParentMode());446 NullParent::getInstance()->addChild(pn, pn->getParentMode()); 444 447 pn = iterator->nextElement(); 445 448 } 446 449 delete iterator; 447 this->parent->children->remove(this); 450 if (this->parent != NULL) 451 this->parent->children->remove(this); 448 452 } 449 453 -
trunk/src/lib/graphics/render2D/element_2d.cc
r5212 r5214 54 54 Render2D::getInstance()->unregisterElement2D(this); 55 55 56 tIterator<Element2D>* iterator = this->children->getIterator();57 Element2D* pn = iterator->firstElement();58 while( pn != NULL)59 {60 delete pn;61 pn = iterator->nextElement();62 }63 delete iterator;64 /* this deletes all children in the list */65 delete this->children;66 56 if (this->parent) 67 57 this->parent->removeChild2D(this); 58 else 59 { 60 tIterator<Element2D>* iterator = this->children->getIterator(); 61 Element2D* pn = iterator->firstElement(); 62 while( pn != NULL) 63 { 64 delete pn; 65 pn = iterator->nextElement(); 66 } 67 delete iterator; 68 /* this deletes all children in the list */ 69 } 70 delete this->children; 68 71 69 72 if (this->toCoordinate != NULL) … … 470 473 { 471 474 child->remove2D(); 472 this->children->remove(child);473 child->parent = NULL;475 // this->children->remove(child); 476 // child->parent = NULL; 474 477 } 475 478 } … … 491 494 } 492 495 delete iterator; 493 this->parent->children->remove(this); 496 if (this->parent != NULL) 497 this->parent->children->remove(this); 494 498 } 495 499 -
trunk/src/lib/shell/shell_buffer.cc
r5212 r5214 165 165 { 166 166 // newLineEnd = newLineBegin + strlen(newLineBegin); 167 strc at(this->keepBufferArray, newLineBegin);167 strcpy(this->keepBufferArray, newLineBegin); 168 168 this->keepBuffer = true; 169 169 break;
Note: See TracChangeset
for help on using the changeset viewer.