Drop memory allocator from ClientNetworkGameSocketHandler
Have ClientNetworkGameSocketHandler initialise all of its members on construction and not derive from ZeroedMemoryAllocator. (cherry picked from commit dddda4f0b7ba0bd6f310f924d3b85cadbc81dc99)
This commit is contained in:

committed by
Jonathan G Rennison

parent
33e3956b13
commit
80fd6a2783
@@ -123,7 +123,9 @@ struct PacketReader : LoadFilter {
|
|||||||
* Create a new socket for the client side of the game connection.
|
* Create a new socket for the client side of the game connection.
|
||||||
* @param s The socket to connect with.
|
* @param s The socket to connect with.
|
||||||
*/
|
*/
|
||||||
ClientNetworkGameSocketHandler::ClientNetworkGameSocketHandler(SOCKET s) : NetworkGameSocketHandler(s), savegame(NULL), status(STATUS_INACTIVE)
|
ClientNetworkGameSocketHandler::ClientNetworkGameSocketHandler (SOCKET s)
|
||||||
|
: NetworkGameSocketHandler (s),
|
||||||
|
savegame (NULL), token (0), status (STATUS_INACTIVE)
|
||||||
{
|
{
|
||||||
assert(ClientNetworkGameSocketHandler::my_client == NULL);
|
assert(ClientNetworkGameSocketHandler::my_client == NULL);
|
||||||
ClientNetworkGameSocketHandler::my_client = this;
|
ClientNetworkGameSocketHandler::my_client = this;
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
#include "network_internal.h"
|
#include "network_internal.h"
|
||||||
|
|
||||||
/** Class for handling the client side of the game connection. */
|
/** Class for handling the client side of the game connection. */
|
||||||
class ClientNetworkGameSocketHandler : public ZeroedMemoryAllocator, public NetworkGameSocketHandler {
|
class ClientNetworkGameSocketHandler : public NetworkGameSocketHandler {
|
||||||
private:
|
private:
|
||||||
struct PacketReader *savegame; ///< Packet reader for reading the savegame.
|
struct PacketReader *savegame; ///< Packet reader for reading the savegame.
|
||||||
byte token; ///< The token we need to send back to the server to prove we're the right client.
|
byte token; ///< The token we need to send back to the server to prove we're the right client.
|
||||||
|
Reference in New Issue
Block a user