From 3319bcc581ee9bb7dca9c7ddf72e2ca1b2ff8b36 Mon Sep 17 00:00:00 2001 From: NN Date: Sat, 30 May 2015 21:06:32 +0300 Subject: [PATCH] Fix incorrect thread procedure prototype. It has to be __stdcall. Remove unnecessary casts. --- PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp | 3 +-- PowerEditor/src/ScitillaComponent/FindReplaceDlg.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp index 3c8fb972..6ee03aae 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp @@ -2999,8 +2999,7 @@ HWND Progress::open(HWND hCallerWnd, const TCHAR* header) else _tcscpy_s(_header, _countof(_header), cDefaultHeader); - _hThread = ::CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)threadFunc, - (LPVOID)this, 0, NULL); + _hThread = ::CreateThread(NULL, 0, threadFunc, this, 0, NULL); if (!_hThread) { ::CloseHandle(_hActiveState); diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h index 92a35fb4..137c4c4c 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h @@ -440,7 +440,7 @@ private: static volatile LONG refCount; - static DWORD threadFunc(LPVOID data); + static DWORD WINAPI threadFunc(LPVOID data); static LRESULT APIENTRY wndProc(HWND hwnd, UINT umsg, WPARAM wparam, LPARAM lparam); // Disable copy construction and operator=