Changeset 11054 for code/branches/cpp11_v3/src/libraries/network/Server.cc
- 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/libraries/network/Server.cc
r10622 r11054 194 194 void Server::printRTT() 195 195 { 196 // for( ClientInformation* temp=ClientInformation::getBegin(); temp!= 0; temp=temp->next() )196 // for( ClientInformation* temp=ClientInformation::getBegin(); temp!=nullptr; temp=temp->next() ) 197 197 // orxout(message) << "Round trip time to client with ID: " << temp->getID() << " is " << temp->getRTT() << " ms" << endl; 198 198 } … … 232 232 { 233 233 std::vector<packet::Gamestate*> gamestates = GamestateManager::getGamestates(); 234 std::vector<packet::Gamestate*>::iterator it; 235 for( it = gamestates.begin(); it != gamestates.end(); ++it ) 234 for( packet::Gamestate* gamestate : gamestates ) 236 235 { 237 (*it)->send(static_cast<Host*>(this));236 gamestate->send(static_cast<Host*>(this)); 238 237 } 239 238 return true; … … 244 243 { 245 244 // ClientInformation *temp = ClientInformation::getBegin(); 246 // if( temp == NULL)245 // if( temp == nullptr ) 247 246 //no client connected 248 247 if( this->clientIDs_.size()==0 ) … … 255 254 } 256 255 // orxout(verbose, context::network) << "sending DeleteObjects" << endl; 257 // while(temp != NULL){256 // while(temp != nullptr){ 258 257 // if( !(temp->getSynched()) ) 259 258 // { … … 434 433 return true; 435 434 436 std::vector<uint32_t>::iterator it; 437 for( it=this->clientIDs_.begin(); it!=this->clientIDs_.end(); ++it ) 438 if( *it == targetID ) 435 for( uint32_t id : this->clientIDs_ ) 436 if( id == targetID ) 439 437 return true; 440 438
Note: See TracChangeset
for help on using the changeset viewer.