Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 10, 2016, 1:54:11 PM (9 years ago)
Author:
landauf
Message:

merged branch cpp11_v2 into cpp11_v3

Location:
code/branches/cpp11_v3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v3

  • code/branches/cpp11_v3/src/modules/objects/SpaceBoundaries.cc

    r10624 r11054  
    5959            this->pawnsIn_.clear();
    6060
    61             for( std::vector<BillboardAdministration>::iterator current = this->billboards_.begin(); current != this->billboards_.end(); current++)
     61            for(BillboardAdministration& billboard : this->billboards_)
    6262            {
    63                 if( current->billy != NULL)
    64                 {
    65                     delete current->billy;
     63                if( billboard.billy != nullptr)
     64                {
     65                    delete billboard.billy;
    6666                }
    6767            }
     
    7373    {
    7474        pawnsIn_.clear();
    75         for(ObjectList<Pawn>::iterator current = ObjectList<Pawn>::begin(); current != ObjectList<Pawn>::end(); ++current)
    76         {
    77             Pawn* currentPawn = *current;
     75        for(Pawn* currentPawn : ObjectList<Pawn>())
     76        {
    7877            if( this->reaction_ == 0 )
    7978            {
     
    127126    void SpaceBoundaries::setBillboardOptions(Billboard *billy)
    128127    {
    129         if(billy != NULL)
     128        if(billy != nullptr)
    130129        {
    131130            billy->setMaterial("Grid");
     
    138137    void SpaceBoundaries::removeAllBillboards()
    139138    {
    140         for( std::vector<BillboardAdministration>::iterator current = this->billboards_.begin(); current != this->billboards_.end(); current++ )
    141         {
    142             current->usedYet = false;
    143             current->billy->setVisible(false);
     139        for(BillboardAdministration& billboard : this->billboards_)
     140        {
     141            billboard.usedYet = false;
     142            billboard.billy->setVisible(false);
    144143        }
    145144    }
     
    208207        float distance;
    209208        bool humanItem;
    210         for( std::list<WeakPtr<Pawn> >::iterator current = pawnsIn_.begin(); current != pawnsIn_.end(); current++ )
    211         {
    212             Pawn* currentPawn = *current;
     209        for(Pawn* currentPawn : pawnsIn_)
     210        {
    213211            if( currentPawn && currentPawn->getNode() )
    214212            {
     
    250248    float SpaceBoundaries::computeDistance(WorldEntity *item)
    251249    {
    252         if(item != NULL)
     250        if(item != nullptr)
    253251        {
    254252            Vector3 itemPosition = item->getWorldPosition();
     
    310308    bool SpaceBoundaries::isHumanPlayer(Pawn *item)
    311309    {
    312         if(item != NULL)
     310        if(item != nullptr)
    313311        {
    314312            if(item->getPlayer())
Note: See TracChangeset for help on using the changeset viewer.