forked from mirror/OpenTTD
(svn r14719) -Codechange: replace DEREF_CLIENT with an instance function and replace looping socket structs with info structs when the loop is only interested in the info structs (i.e. not derefing the info from sockets when one can loop info directly and the socket isn't used)
This commit is contained in:
@@ -110,6 +110,13 @@ public:
|
||||
bool IsPacketQueueEmpty();
|
||||
|
||||
Packet *Recv_Packet(NetworkRecvStatus *status);
|
||||
|
||||
inline NetworkClientInfo *GetInfo() const
|
||||
{
|
||||
extern NetworkClientInfo _network_client_info[MAX_CLIENT_INFO];
|
||||
extern NetworkTCPSocketHandler _clients[MAX_CLIENTS];
|
||||
return &_network_client_info[this - _clients];
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* ENABLE_NETWORK */
|
||||
|
Reference in New Issue
Block a user