Changeset 10916 for code/branches/cpp11_v2/src/libraries/network/Host.cc
- Timestamp:
- Dec 2, 2015, 11:22:03 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/network/Host.cc
r10821 r10916 80 80 void Host::addPacket(ENetPacket *packet, int clientID, uint8_t channelID) 81 81 { 82 for( auto & instances_: instances_s)82 for(Host* host : instances_s) 83 83 { 84 if( (instances_)->isActive() )84 if( host->isActive() ) 85 85 { 86 (instances_)->queuePacket(packet, clientID, channelID);86 host->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( auto & instances_: instances_s)100 if( (instances_)->isActive() )101 (instances_)->doSendChat(message, sourceID, targetID);99 for(Host* host : instances_s) 100 if( host->isActive() ) 101 host->doSendChat(message, sourceID, targetID); 102 102 } 103 103 … … 114 114 bool Host::isServer() 115 115 { 116 for ( auto & instances_: instances_s)116 for (Host* host : instances_s) 117 117 { 118 if( (instances_)->isActive() )118 if( host->isActive() ) 119 119 { 120 if( (instances_)->isServer_() )120 if( host->isServer_() ) 121 121 return true; 122 122 }
Note: See TracChangeset
for help on using the changeset viewer.