Changeset 10821 for code/branches/cpp11_v2/src/libraries/network
- Timestamp:
- Nov 21, 2015, 7:05:53 PM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/libraries/network
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/network/FunctionCall.cc
r10765 r10821 131 131 *(uint32_t*)(mem+2*sizeof(uint32_t)) = this->objectID_; 132 132 mem += 3*sizeof(uint32_t); 133 for( std::vector<MultiType>::iterator it = this->arguments_.begin(); it!=this->arguments_.end(); ++it)133 for(auto & elem : this->arguments_) 134 134 { 135 it->exportData( mem );135 elem.exportData( mem ); 136 136 } 137 137 } -
code/branches/cpp11_v2/src/libraries/network/Host.cc
r10768 r10821 80 80 void Host::addPacket(ENetPacket *packet, int clientID, uint8_t channelID) 81 81 { 82 for( std::vector<Host*>::iterator it = instances_s.begin(); it!=instances_s.end(); ++it)82 for(auto & instances_ : instances_s) 83 83 { 84 if( ( *it)->isActive() )84 if( (instances_)->isActive() ) 85 85 { 86 ( *it)->queuePacket(packet, clientID, channelID);86 (instances_)->queuePacket(packet, clientID, channelID); 87 87 } 88 88 } … … 97 97 void Host::sendChat(const std::string& message, unsigned int sourceID, unsigned int targetID) 98 98 { 99 for( std::vector<Host*>::iterator it = instances_s.begin(); it!=instances_s.end(); ++it)100 if( ( *it)->isActive() )101 ( *it)->doSendChat(message, sourceID, targetID);99 for(auto & instances_ : instances_s) 100 if( (instances_)->isActive() ) 101 (instances_)->doSendChat(message, sourceID, targetID); 102 102 } 103 103 … … 114 114 bool Host::isServer() 115 115 { 116 for ( std::vector<Host*>::iterator it=instances_s.begin(); it!=instances_s.end(); ++it)116 for (auto & instances_ : instances_s) 117 117 { 118 if( ( *it)->isActive() )118 if( (instances_)->isActive() ) 119 119 { 120 if( ( *it)->isServer_() )120 if( (instances_)->isServer_() ) 121 121 return true; 122 122 } -
code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.cc
r10768 r10821 88 88 } 89 89 // delete all Synchronisable Variables from syncList_ ( which are also in stringList_ ) 90 for( std::vector<SynchronisableVariableBase*>::iterator it = syncList_.begin(); it!=syncList_.end(); it++)91 delete ( *it);90 for(auto & elem : syncList_) 91 delete (elem); 92 92 syncList_.clear(); 93 93 stringList_.clear();
Note: See TracChangeset
for help on using the changeset viewer.