diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-03 16:02:14 +0200 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-03 16:02:14 +0200 |
commit | 3ad2582c4a4a6378f294f9256ecbcbdf0ae88e3a (patch) | |
tree | 412a28ef6a572efc7039df1c363bf47a3dec4b19 /protocols/EmLanProto/src/lan.cpp | |
parent | 9a6f750a482d1d1ebf4281bb7bf8133e547ad438 (diff) |
mir_forkThread<typename> - stronger typizatioin for thread function parameter
Diffstat (limited to 'protocols/EmLanProto/src/lan.cpp')
-rw-r--r-- | protocols/EmLanProto/src/lan.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/protocols/EmLanProto/src/lan.cpp b/protocols/EmLanProto/src/lan.cpp index 301e2a8284..d7737b2479 100644 --- a/protocols/EmLanProto/src/lan.cpp +++ b/protocols/EmLanProto/src/lan.cpp @@ -131,8 +131,8 @@ void CLan::StartListen() return;
}
- m_hListenThread = mir_forkthread(ListenProc, (void*)this);
- m_hAcceptTCPThread = mir_forkthread(AcceptTCPProc, (void*)this);
+ m_hListenThread = mir_forkthread(ListenProc, this);
+ m_hAcceptTCPThread = mir_forkthread(AcceptTCPProc, this);
if (m_hListenThread == nullptr || m_hAcceptTCPThread == nullptr) {
m_mode = LM_ON;
m_status = LS_CANT_CREATE_THREADS;
@@ -216,7 +216,7 @@ void CLan::AcceptTCP() tcp_conn->m_addr = addrFrom.sin_addr.S_un.S_addr;
tcp_conn->m_lan = this;
tcp_conn->m_socket = in_socket;
- mir_forkthread(OnInTCPConnectionProc, (void*)tcp_conn);
+ mir_forkthread(OnInTCPConnectionProc, tcp_conn);
Sleep(100);
}
m_hAcceptTCPThread = nullptr;
@@ -252,8 +252,7 @@ SOCKET CLan::CreateTCPConnection(u_long addr, LPVOID lpParameter) tcp_conn->m_lan = this;
tcp_conn->m_addr = addr;
tcp_conn->m_lpParameter = lpParameter;
-
- mir_forkthread(OnOutTCPConnectionProc, (void*)tcp_conn);
+ mir_forkthread(OnOutTCPConnectionProc, tcp_conn);
return out_socket;
}
|