(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:
rubidium
2008-12-23 08:39:30 +00:00
parent 94e7f41a9d
commit b4734ee9a4
7 changed files with 41 additions and 45 deletions

View File

@@ -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 */