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

Restore safe reinterpret_casts in MSWindowsDesks

  • Loading branch information...
nlyan committed Sep 13, 2016
1 parent f7ad162 commit 2a5dc62747b69abdaec93005ecf34733d55275be
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/lib/platform/MSWindowsDesks.cpp
@@ -241,7 +241,7 @@ void
MSWindowsDesks::getCursorPos(SInt32& x, SInt32& y) const
{
POINT pos;
- sendMessage(SYNERGY_MSG_CURSOR_POS, static_cast<WPARAM>(&pos), 0);
+ sendMessage(SYNERGY_MSG_CURSOR_POS, reinterpret_cast<WPARAM>(&pos), 0);
x = pos.x;
y = pos.y;
}
@@ -427,7 +427,7 @@ void
MSWindowsDesks::destroyClass(ATOM windowClass) const
{
if (windowClass != 0) {
- UnregisterClass(static_cast<LPCTSTR>(windowClass),
+ UnregisterClass(reinterpret_cast<LPCTSTR>(windowClass),
MSWindowsScreen::getWindowInstance());
}
}
@@ -437,7 +437,7 @@ MSWindowsDesks::createWindow(ATOM windowClass, const char* name) const
{
HWND window = CreateWindowEx(WS_EX_TRANSPARENT |
WS_EX_TOOLWINDOW,
- static_cast<LPCTSTR>(windowClass),
+ reinterpret_cast<LPCTSTR>(windowClass),
name,
WS_POPUP,
0, 0, 1, 1,
@@ -757,7 +757,7 @@ MSWindowsDesks::deskThread(void* vdesk)
break;
case SYNERGY_MSG_CURSOR_POS: {
- POINT* pos = static_cast<POINT*>(msg.wParam);
+ POINT* pos = reinterpret_cast<POINT*>(msg.wParam);
if (!GetCursorPos(pos)) {
pos->x = m_xCenter;
pos->y = m_yCenter;

0 comments on commit 2a5dc62

Please sign in to comment.