From acb351950287339b3dcd44e462999e3317047401 Mon Sep 17 00:00:00 2001 From: sapier Date: Fri, 22 Aug 2014 19:25:21 +0200 Subject: Fix MSVC compiler warning about passing this pointer in initializer list --- src/connection.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/connection.h') diff --git a/src/connection.h b/src/connection.h index 516702cb8..be1627dfa 100644 --- a/src/connection.h +++ b/src/connection.h @@ -918,13 +918,17 @@ class ConnectionSendThread : public JThread { public: friend class UDPPeer; - ConnectionSendThread(Connection* parent, - unsigned int max_packet_size, float timeout); + ConnectionSendThread(unsigned int max_packet_size, float timeout); void * Thread (); void Trigger(); + void setParent(Connection* parent) { + assert(parent != NULL); + m_connection = parent; + } + void setPeerTimeout(float peer_timeout) { m_timeout = peer_timeout; } @@ -970,11 +974,15 @@ private: class ConnectionReceiveThread : public JThread { public: - ConnectionReceiveThread(Connection* parent, - unsigned int max_packet_size); + ConnectionReceiveThread(unsigned int max_packet_size); void * Thread (); + void setParent(Connection* parent) { + assert(parent != NULL); + m_connection = parent; + } + private: void receive (); -- cgit v1.2.3