diff options
Diffstat (limited to 'plugins/SmileyAdd/src')
-rw-r--r-- | plugins/SmileyAdd/src/dlgboxsubclass.cpp | 2 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/download.cpp | 2 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/imagecache.cpp | 6 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/options.cpp | 2 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/services.cpp | 2 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/smltool.cpp | 5 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/smltool.h | 3 |
7 files changed, 10 insertions, 12 deletions
diff --git a/plugins/SmileyAdd/src/dlgboxsubclass.cpp b/plugins/SmileyAdd/src/dlgboxsubclass.cpp index 61964955f1..884b323837 100644 --- a/plugins/SmileyAdd/src/dlgboxsubclass.cpp +++ b/plugins/SmileyAdd/src/dlgboxsubclass.cpp @@ -188,7 +188,7 @@ int SmileyButtonPressed(WPARAM, LPARAM lParam) stwp->direction = 0;
stwp->xPosition = pcbc->pt.x;
stwp->yPosition = pcbc->pt.y;
- mir_forkthread(SmileyToolThread, stwp);
+ mir_forkThread<SmileyToolWindowParam>(SmileyToolThread, stwp);
return 0;
}
diff --git a/plugins/SmileyAdd/src/download.cpp b/plugins/SmileyAdd/src/download.cpp index 306b980276..328bae9afd 100644 --- a/plugins/SmileyAdd/src/download.cpp +++ b/plugins/SmileyAdd/src/download.cpp @@ -191,7 +191,7 @@ bool GetSmileyFile(CMStringW &url, const CMStringW &packstr) if (!threadRunning) {
threadRunning = true;
- mir_forkthread(SmileyDownloadThread, nullptr);
+ mir_forkthread(SmileyDownloadThread);
}
url = filename;
diff --git a/plugins/SmileyAdd/src/imagecache.cpp b/plugins/SmileyAdd/src/imagecache.cpp index cbf5c69a39..87e0426512 100644 --- a/plugins/SmileyAdd/src/imagecache.cpp +++ b/plugins/SmileyAdd/src/imagecache.cpp @@ -29,7 +29,7 @@ static UINT_PTR timerId; static void CALLBACK timerProc(HWND, UINT, UINT_PTR, DWORD)
{
WaitForSingleObject(g_hMutexIm, 3000);
- const time_t ts = time(nullptr) - 10;
+ const time_t ts = time(0) - 10;
if (lastmodule && ts > laststamp) {
FreeLibrary(lastmodule);
lastmodule = nullptr;
@@ -69,7 +69,7 @@ static HMODULE LoadDll(const CMStringW &file) lastmodule = LoadLibraryEx(file.c_str(), nullptr, LOAD_LIBRARY_AS_DATAFILE);
}
- laststamp = time(nullptr);
+ laststamp = time(0);
ReleaseMutex(g_hMutexIm);
return lastmodule;
@@ -98,7 +98,7 @@ long ImageBase::Release(void) long cnt = m_lRefCount;
if (cnt) m_lRefCount = --cnt;
- if (cnt == 0) m_timestamp = time(nullptr);
+ if (cnt == 0) m_timestamp = time(0);
ReleaseMutex(g_hMutexIm);
return cnt;
diff --git a/plugins/SmileyAdd/src/options.cpp b/plugins/SmileyAdd/src/options.cpp index 3f1551fd42..897982ade5 100644 --- a/plugins/SmileyAdd/src/options.cpp +++ b/plugins/SmileyAdd/src/options.cpp @@ -538,7 +538,7 @@ void OptionsDialogType::ShowSmileyPreview(void) stwp->direction = 1;
stwp->hContact = NULL;
- mir_forkthread(SmileyToolThread, stwp);
+ mir_forkThread<SmileyToolWindowParam>(SmileyToolThread, stwp);
}
void OptionsType::Save(void)
diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp index adc15d008e..0bb2349dc5 100644 --- a/plugins/SmileyAdd/src/services.cpp +++ b/plugins/SmileyAdd/src/services.cpp @@ -125,7 +125,7 @@ INT_PTR ShowSmileySelectionCommand(WPARAM, LPARAM lParam) stwp->yPosition = smaddInfo->yPosition;
stwp->direction = smaddInfo->Direction;
- mir_forkthread(SmileyToolThread, stwp);
+ mir_forkThread<SmileyToolWindowParam>(SmileyToolThread, stwp);
return TRUE;
}
diff --git a/plugins/SmileyAdd/src/smltool.cpp b/plugins/SmileyAdd/src/smltool.cpp index 84c0e687ea..d264e314e4 100644 --- a/plugins/SmileyAdd/src/smltool.cpp +++ b/plugins/SmileyAdd/src/smltool.cpp @@ -737,11 +737,10 @@ int SmileyToolWindowType::CalculateCoordinatesToButton(POINT pt, int scroll) return pos;
}
-void __cdecl SmileyToolThread(void *arg)
+void __cdecl SmileyToolThread(SmileyToolWindowParam *stwp)
{
Thread_SetName("SmileyAdd: SmileyToolThread");
- SmileyToolWindowParam *stwp = (SmileyToolWindowParam*)arg;
if (stwp->pSmileyPack && stwp->pSmileyPack->VisibleSmileyCount()) {
WNDCLASSEX wndclass;
wndclass.cbSize = sizeof(wndclass);
@@ -761,7 +760,7 @@ void __cdecl SmileyToolThread(void *arg) CreateWindowEx(WS_EX_TOPMOST | WS_EX_NOPARENTNOTIFY, L"SmileyTool", nullptr,
WS_BORDER | WS_POPUP | WS_VISIBLE,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
- ((SmileyToolWindowParam*)arg)->hWndParent, nullptr, g_hInst, arg);
+ stwp->hWndParent, nullptr, g_hInst, stwp);
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL);
diff --git a/plugins/SmileyAdd/src/smltool.h b/plugins/SmileyAdd/src/smltool.h index 41072787a0..26221543dd 100644 --- a/plugins/SmileyAdd/src/smltool.h +++ b/plugins/SmileyAdd/src/smltool.h @@ -35,8 +35,7 @@ struct SmileyToolWindowParam MCONTACT hContact;
};
-
-void __cdecl SmileyToolThread(void *arg);
+void __cdecl SmileyToolThread(SmileyToolWindowParam *stwp);
#ifndef min
#define min(A, B) ((A) < (B) ? (A) : (B))
|