Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9755 in orxonox.OLD for branches/new_class_id/src/lib/coord


Ignore:
Timestamp:
Sep 17, 2006, 11:33:22 PM (18 years ago)
Author:
bensch
Message:

orxonox/new_class_id: some minor work… nothing too special, and nothing too big… tried to fix the PNode, and some documentations…

hmm… i also think of writing a book. maybe i will write the whole story as a Commit message :) so it is backed up. hehe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/coord/p_node.cc

    r9715 r9755  
    7878PNode::~PNode ()
    7979{
    80   PRINTF(4)("delete %s::%s\n", this->getClassCName(), this->getCName());
     80  PRINTF(0)("delete %s::%s\n", this->getClassCName(), this->getCName());
     81  this->debugNode(0);
    8182  // remove the Node, delete it's children (if required).
    82   std::list<PNode*>::iterator deleteNode;
    83   unsigned int size;
    8483  while(!this->children.empty())
    8584  {
    86     deleteNode = this->children.begin();
    87     size = this->children.size();
     85    PNode* deleteNode = this->children.front();
    8886    if ((this->parentMode & PNODE_PROHIBIT_CHILD_DELETE) ||
    89         ((*deleteNode)->parentMode & PNODE_PROHIBIT_DELETE_WITH_PARENT))
     87        (deleteNode->parentMode & PNODE_PROHIBIT_DELETE_WITH_PARENT))
    9088    {
    91       if (this == PNode::nullParent && (*deleteNode)->parentMode & PNODE_REPARENT_TO_NULL)
     89      if (this == PNode::nullParent && deleteNode->parentMode & PNODE_REPARENT_TO_NULL)
    9290      {
    9391        PRINTF(4)("%s::%s deletes %s::%s\n",
    9492                  this->getClassCName(), this->getCName(),
    95                   (*deleteNode)->getClassCName(), (*deleteNode)->getCName());
    96         delete (*deleteNode);
     93                  deleteNode->getClassCName(), deleteNode->getCName());
     94        delete deleteNode;
    9795      }
    9896      else
     
    10098        PRINTF(4)("%s::%s reparents %s::%s\n",
    10199                  this->getClassCName(), this->getCName(),
    102                   (*deleteNode)->getClassCName(), (*deleteNode)->getCName());
    103         (*deleteNode)->reparent();
     100                  deleteNode->getClassCName(), deleteNode->getCName());
     101        deleteNode->reparent();
    104102      }
    105103    }
     
    108106      PRINTF(4)("%s::%s deletes PNode: %s::%s\n",
    109107                this->getClassCName(), this->getCName(),
    110                 (*deleteNode)->getClassCName(), (*deleteNode)->getCName());
    111       delete (*deleteNode);
     108                deleteNode->getClassCName(), deleteNode->getCName());
     109      delete deleteNode;
    112110    }
    113111  }
Note: See TracChangeset for help on using the changeset viewer.