Restore safe reinterpret_casts in MSWindowsClientTaskBarReceiver

This commit is contained in:
Andrew Nelless
2016-09-13 10:53:27 +01:00
parent 19b9be4593
commit 23cf284a66
3 changed files with 10 additions and 10 deletions

View File

@@ -304,7 +304,7 @@ MSWindowsPortableTaskBarReceiver::createWindow()
MAKEINTRESOURCE(IDD_TASKBAR_STATUS),
NULL,
(DLGPROC)&MSWindowsPortableTaskBarReceiver::staticDlgProc,
static_cast<LPARAM>(
reinterpret_cast<LPARAM>(
static_cast<void*>(this)));
// window should appear on top of everything, including (especially)
@@ -355,15 +355,15 @@ MSWindowsPortableTaskBarReceiver::staticDlgProc(HWND hwnd,
MSWindowsPortableTaskBarReceiver* self = NULL;
if (msg == WM_INITDIALOG) {
self = static_cast<MSWindowsPortableTaskBarReceiver*>(
static_cast<void*>(lParam));
reinterpret_cast<void*>(lParam));
SetWindowLongPtr(hwnd, GWLP_USERDATA, lParam);
}
else {
// get the extra window data and forward the call
LONG data = (LONG)GetWindowLongPtr(hwnd, GWLP_USERDATA);
LONG_PTR data = GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (data != 0) {
self = static_cast<MSWindowsPortableTaskBarReceiver*>(
static_cast<void*>(data));
reinterpret_cast<void*>(data));
}
}