This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Restore safe reinterpret_casts in MSWindowsScreenSaver

  • Loading branch information...
nlyan committed Sep 13, 2016
1 parent 788f6ea commit 19b9be45930e62def36926d2a0fe1bee3ee1d3f7
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/lib/platform/MSWindowsScreenSaver.cpp
@@ -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;

0 comments on commit 19b9be4

Please sign in to comment.