- Timestamp:
- Oct 4, 2015, 12:13:42 PM (9 years ago)
- Location:
- code/branches/presentationFS15merge
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentationFS15merge
- Property svn:mergeinfo changed
/code/branches/multiplayerFS15 (added) merged: 10324,10334,10427,10434,10446-10447,10456-10457
- Property svn:mergeinfo changed
-
code/branches/presentationFS15merge/src/libraries/network/PeerList.cc
r8858 r10612 38 38 PeerList::~PeerList() { } 39 39 40 int 40 int 41 41 PeerList::addPeer( ENetPeer *toadd ) 42 42 { /* error correction */ 43 if( toadd == NULL ) 43 if( toadd == NULL ) 44 44 { orxout(internal_error, context::master_server) << "PeerList::addPeer: empty peer given." << endl; 45 45 return -1; … … 52 52 53 53 bool sub_compAddr( ENetAddress addr1, ENetAddress addr2 ) 54 { 54 { 55 55 for( int i = 0; i < 16; ++i ) 56 56 if( addr1.host.addr[i] < addr2.host.addr[i] ) … … 61 61 return 0; 62 62 } 63 63 64 64 65 65 bool … … 69 69 70 70 /* loop through list elements */ 71 for( i = peerlist.begin(); i != peerlist.end(); ++i ) 71 for( i = peerlist.begin(); i != peerlist.end(); ++i ) 72 72 if( !sub_compAddr((*i)->address, addr ) ) 73 73 { /* found this name, remove and quit */ … … 86 86 87 87 /* loop through list elements */ 88 for( i = peerlist.begin(); i != peerlist.end(); ++i ) 88 for( i = peerlist.begin(); i != peerlist.end(); ++i ) 89 89 if( !sub_compAddr((*i)->address, addr ) ) 90 90 /* found this name, remove and quit */ … … 95 95 } 96 96 97 int 98 PeerList::count(){ 99 return this->peerlist.size(); 100 } 101 97 102 } 98
Note: See TracChangeset
for help on using the changeset viewer.