Restore safe reinterpret_casts in MSWindowsScreenSaver

This commit is contained in:
Andrew Nelless 2016-09-13 10:39:06 +01:00
parent 788f6eab9f
commit 19b9be4593
1 changed files with 2 additions and 2 deletions

View File

@ -162,7 +162,7 @@ MSWindowsScreenSaver::deactivate()
if (desktop != NULL) {
EnumDesktopWindows(desktop,
&MSWindowsScreenSaver::killScreenSaverFunc,
static_cast<LPARAM>(&killed));
reinterpret_cast<LPARAM>(&killed));
CloseDesktop(desktop);
}
@ -205,7 +205,7 @@ MSWindowsScreenSaver::killScreenSaverFunc(HWND hwnd, LPARAM arg)
HINSTANCE instance = (HINSTANCE)GetWindowLongPtr(hwnd, GWLP_HINSTANCE);
if (instance != MSWindowsScreen::getWindowInstance()) {
PostMessage(hwnd, WM_CLOSE, 0, 0);
*static_cast<bool*>(arg) = true;
*reinterpret_cast<bool*>(arg) = true;
}
}
return TRUE;