summaryrefslogtreecommitdiff
path: root/src/core/stdmsg
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-03 16:02:14 +0200
committerGeorge Hazan <ghazan@miranda.im>2018-05-03 16:02:14 +0200
commit3ad2582c4a4a6378f294f9256ecbcbdf0ae88e3a (patch)
tree412a28ef6a572efc7039df1c363bf47a3dec4b19 /src/core/stdmsg
parent9a6f750a482d1d1ebf4281bb7bf8133e547ad438 (diff)
mir_forkThread<typename> - stronger typizatioin for thread function parameter
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r--src/core/stdmsg/src/chat_window.cpp11
-rw-r--r--src/core/stdmsg/src/cmdlist.cpp2
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp2
3 files changed, 7 insertions, 8 deletions
diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp
index 2f5e77c79e..55ca576727 100644
--- a/src/core/stdmsg/src/chat_window.cpp
+++ b/src/core/stdmsg/src/chat_window.cpp
@@ -205,9 +205,8 @@ void CChatRoomDlg::LoadSettings()
/////////////////////////////////////////////////////////////////////////////////////////
-static void __cdecl phase2(void *lParam)
+static void __cdecl phase2(SESSION_INFO *si)
{
- SESSION_INFO *si = (SESSION_INFO*)lParam;
Sleep(30);
if (si && si->pDlg)
si->pDlg->RedrawLog2();
@@ -229,7 +228,7 @@ void CChatRoomDlg::RedrawLog()
index++;
}
StreamInEvents(pLog, true);
- mir_forkthread(phase2, m_si);
+ mir_forkThread<SESSION_INFO>(phase2, m_si);
}
else StreamInEvents(m_si->pLogEnd, true);
}
@@ -641,8 +640,8 @@ LRESULT CChatRoomDlg::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
return 0;
}
if (db_get_b(0, CHAT_MODULE, "SendOnDblEnter", 0)) {
- if (m_iLastEnterTime + 2 < time(nullptr))
- m_iLastEnterTime = time(nullptr);
+ if (m_iLastEnterTime + 2 < time(0))
+ m_iLastEnterTime = time(0);
else {
m_message.SendMsg(WM_KEYDOWN, VK_BACK, 0);
m_message.SendMsg(WM_KEYUP, VK_BACK, 0);
@@ -672,7 +671,7 @@ LRESULT CChatRoomDlg::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
return 0;
if (db_get_b(0, CHAT_MODULE, "SendOnDblEnter", 0))
- if (m_iLastEnterTime + 2 >= time(nullptr))
+ if (m_iLastEnterTime + 2 >= time(0))
return 0;
break;
diff --git a/src/core/stdmsg/src/cmdlist.cpp b/src/core/stdmsg/src/cmdlist.cpp
index 62f57de562..726eb7a9dc 100644
--- a/src/core/stdmsg/src/cmdlist.cpp
+++ b/src/core/stdmsg/src/cmdlist.cpp
@@ -92,7 +92,7 @@ void msgQueue_processack(MCONTACT hContact, int id, BOOL success, const char *sz
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT | DBEF_UTF | (p->flags & PREF_RTL ? DBEF_RTL : 0);
dbei.szModule = GetContactProto(hContact);
- dbei.timestamp = time(nullptr);
+ dbei.timestamp = time(0);
dbei.cbBlob = (DWORD)(mir_strlen(p->szMsg) + 1);
dbei.pBlob = (PBYTE)p->szMsg;
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index 85ef7b2a55..ee4230632b 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -172,7 +172,7 @@ void CSrmmWindow::OnInitDialog()
case LOADHISTORY_TIME:
DBEVENTINFO dbei = {};
if (m_hDbEventFirst == 0)
- dbei.timestamp = (DWORD)time(nullptr);
+ dbei.timestamp = (DWORD)time(0);
else
db_event_get(m_hDbEventFirst, &dbei);