- Timestamp:
- Jan 10, 2016, 1:54:11 PM (9 years ago)
- Location:
- code/branches/cpp11_v3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v3
- Property svn:mergeinfo changed
-
code/branches/cpp11_v3/src/modules/objects/SpaceBoundaries.cc
r10624 r11054 59 59 this->pawnsIn_.clear(); 60 60 61 for( std::vector<BillboardAdministration>::iterator current = this->billboards_.begin(); current != this->billboards_.end(); current++)61 for(BillboardAdministration& billboard : this->billboards_) 62 62 { 63 if( current->billy != NULL)64 { 65 delete current->billy;63 if( billboard.billy != nullptr) 64 { 65 delete billboard.billy; 66 66 } 67 67 } … … 73 73 { 74 74 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 { 78 77 if( this->reaction_ == 0 ) 79 78 { … … 127 126 void SpaceBoundaries::setBillboardOptions(Billboard *billy) 128 127 { 129 if(billy != NULL)128 if(billy != nullptr) 130 129 { 131 130 billy->setMaterial("Grid"); … … 138 137 void SpaceBoundaries::removeAllBillboards() 139 138 { 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); 144 143 } 145 144 } … … 208 207 float distance; 209 208 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 { 213 211 if( currentPawn && currentPawn->getNode() ) 214 212 { … … 250 248 float SpaceBoundaries::computeDistance(WorldEntity *item) 251 249 { 252 if(item != NULL)250 if(item != nullptr) 253 251 { 254 252 Vector3 itemPosition = item->getWorldPosition(); … … 310 308 bool SpaceBoundaries::isHumanPlayer(Pawn *item) 311 309 { 312 if(item != NULL)310 if(item != nullptr) 313 311 { 314 312 if(item->getPlayer())
Note: See TracChangeset
for help on using the changeset viewer.