[Avl-cvs] avl/src avlt.cpp,1.13,1.14
Brought to you by:
hetfield666,
jah2003
From: Gianlorenzo D\\'A. <ja...@us...> - 2004-09-17 11:27:54
|
Update of /cvsroot/avl/avl/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2104 Modified Files: avlt.cpp Log Message: Index: avlt.cpp =================================================================== RCS file: /cvsroot/avl/avl/src/avlt.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** avlt.cpp 17 Sep 2004 07:58:46 -0000 1.13 --- avlt.cpp 17 Sep 2004 11:27:36 -0000 1.14 *************** *** 337,341 **** aux1 = aux2 = NULL; aux = this; ! if(key == getValue()) { //Questi passaggi sono simili a quelli utilizzati per i bst --- 337,341 ---- aux1 = aux2 = NULL; aux = this; ! if(key == getValue()) { //Questi passaggi sono simili a quelli utilizzati per i bst *************** *** 350,355 **** aux2 = (Avlt *)(aux1->getRight()); ! if( aux2 ) aux2->setParent( aux1->getParent() ); if( aux1->getParent() ) --- 350,358 ---- aux2 = (Avlt *)(aux1->getRight()); ! if( aux2 ){ aux2->setParent( aux1->getParent() ); + if(aux1 == this) + aux = aux2; + } if( aux1->getParent() ) *************** *** 361,365 **** aux1->setLeft( NULL ); aux1->setRight( NULL ); ! aux = aux2; if( aux1 != this ) { --- 364,368 ---- aux1->setLeft( NULL ); aux1->setRight( NULL ); ! if( aux1 != this ) { |