diff options
author | sapier <Sapier at GMX dot net> | 2014-08-22 19:25:21 +0200 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2014-12-28 23:40:44 -0500 |
commit | acb351950287339b3dcd44e462999e3317047401 (patch) | |
tree | ac1d0e4c09610a972d4d2a8f17a767b4a75e5091 /src/connection.h | |
parent | ab55da589c27e65e54956b32a1550e21169447ae (diff) | |
download | minetest-acb351950287339b3dcd44e462999e3317047401.tar.gz minetest-acb351950287339b3dcd44e462999e3317047401.tar.bz2 minetest-acb351950287339b3dcd44e462999e3317047401.zip |
Fix MSVC compiler warning about passing this pointer in initializer list
Diffstat (limited to 'src/connection.h')
-rw-r--r-- | src/connection.h | 16 |
1 files changed, 12 insertions, 4 deletions
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 (); |