Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 21, 2015, 7:05:53 PM (8 years ago)
Author:
muemart
Message:

Run clang-modernize -loop-convert

  • Again, not all possible loops were converted
  • It can do pretty cool transformations, but I had to fix a few compile errors, so there might be some runtime errors lurking around too
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/modules/objects/SpaceBoundaries.cc

    r10769 r10821  
    5959            this->pawnsIn_.clear();
    6060
    61             for( std::vector<BillboardAdministration>::iterator current = this->billboards_.begin(); current != this->billboards_.end(); current++)
     61            for(auto & elem : this->billboards_)
    6262            {
    63                 if( current->billy != nullptr)
    64                 {
    65                     delete current->billy;
     63                if( elem.billy != nullptr)
     64                {
     65                    delete elem.billy;
    6666                }
    6767            }
     
    138138    void SpaceBoundaries::removeAllBillboards()
    139139    {
    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);
     140        for(auto & elem : this->billboards_)
     141        {
     142            elem.usedYet = false;
     143            elem.billy->setVisible(false);
    144144        }
    145145    }
     
    208208        float distance;
    209209        bool humanItem;
    210         for( std::list<WeakPtr<Pawn>>::iterator current = pawnsIn_.begin(); current != pawnsIn_.end(); current++ )
    211         {
    212             Pawn* currentPawn = *current;
     210        for(auto currentPawn : pawnsIn_)
     211        {
     212           
    213213            if( currentPawn && currentPawn->getNode() )
    214214            {
Note: See TracChangeset for help on using the changeset viewer.