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

@ -287,7 +287,7 @@ MSWindowsClientTaskBarReceiver::createWindow()
MAKEINTRESOURCE(IDD_TASKBAR_STATUS),
NULL,
(DLGPROC)&MSWindowsClientTaskBarReceiver::staticDlgProc,
static_cast<LPARAM>(
reinterpret_cast<LPARAM>(
static_cast<void*>(this)));
// window should appear on top of everything, including (especially)
@ -338,7 +338,7 @@ MSWindowsClientTaskBarReceiver::staticDlgProc(HWND hwnd,
MSWindowsClientTaskBarReceiver* self = NULL;
if (msg == WM_INITDIALOG) {
self = static_cast<MSWindowsClientTaskBarReceiver*>(
static_cast<void*>(lParam));
reinterpret_cast<void*>(lParam));
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR) lParam);
}
else {

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));
}
}

View File

@ -318,7 +318,7 @@ MSWindowsServerTaskBarReceiver::createWindow()
MAKEINTRESOURCE(IDD_TASKBAR_STATUS),
NULL,
(DLGPROC)&MSWindowsServerTaskBarReceiver::staticDlgProc,
static_cast<LPARAM>(
reinterpret_cast<LPARAM>(
static_cast<void*>(this)));
// window should appear on top of everything, including (especially)
@ -369,15 +369,15 @@ MSWindowsServerTaskBarReceiver::staticDlgProc(HWND hwnd,
MSWindowsServerTaskBarReceiver* self = NULL;
if (msg == WM_INITDIALOG) {
self = static_cast<MSWindowsServerTaskBarReceiver*>(
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<MSWindowsServerTaskBarReceiver*>(
static_cast<void*>(data));
reinterpret_cast<void*>(data));
}
}