Brutally replace all reinterpret_casts with static_casts

This commit is contained in:
Andrew Nelless
2016-09-19 17:22:41 +01:00
parent e6a3caaf75
commit f3d1470e58
46 changed files with 213 additions and 213 deletions

View File

@@ -221,7 +221,7 @@ MSWindowsClientTaskBarReceiver::primaryAction()
const IArchTaskBarReceiver::Icon
MSWindowsClientTaskBarReceiver::getIcon() const
{
return reinterpret_cast<Icon>(m_icon[getStatus()]);
return static_cast<Icon>(m_icon[getStatus()]);
}
void
@@ -263,7 +263,7 @@ MSWindowsClientTaskBarReceiver::loadIcon(UINT id)
IMAGE_ICON,
0, 0,
LR_DEFAULTCOLOR);
return reinterpret_cast<HICON>(icon);
return static_cast<HICON>(icon);
}
void
@@ -287,8 +287,8 @@ MSWindowsClientTaskBarReceiver::createWindow()
MAKEINTRESOURCE(IDD_TASKBAR_STATUS),
NULL,
(DLGPROC)&MSWindowsClientTaskBarReceiver::staticDlgProc,
reinterpret_cast<LPARAM>(
reinterpret_cast<void*>(this)));
static_cast<LPARAM>(
static_cast<void*>(this)));
// window should appear on top of everything, including (especially)
// the task bar.
@@ -337,8 +337,8 @@ MSWindowsClientTaskBarReceiver::staticDlgProc(HWND hwnd,
// and put it in the extra window data then forward the call.
MSWindowsClientTaskBarReceiver* self = NULL;
if (msg == WM_INITDIALOG) {
self = reinterpret_cast<MSWindowsClientTaskBarReceiver*>(
reinterpret_cast<void*>(lParam));
self = static_cast<MSWindowsClientTaskBarReceiver*>(
static_cast<void*>(lParam));
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR) lParam);
}
else {

View File

@@ -238,7 +238,7 @@ MSWindowsPortableTaskBarReceiver::primaryAction()
const IArchTaskBarReceiver::Icon
MSWindowsPortableTaskBarReceiver::getIcon() const
{
return reinterpret_cast<Icon>(m_icon[getStatus()]);
return static_cast<Icon>(m_icon[getStatus()]);
}
void
@@ -280,7 +280,7 @@ MSWindowsPortableTaskBarReceiver::loadIcon(UINT id)
IMAGE_ICON,
0, 0,
LR_DEFAULTCOLOR);
return reinterpret_cast<HICON>(icon);
return static_cast<HICON>(icon);
}
void
@@ -304,8 +304,8 @@ MSWindowsPortableTaskBarReceiver::createWindow()
MAKEINTRESOURCE(IDD_TASKBAR_STATUS),
NULL,
(DLGPROC)&MSWindowsPortableTaskBarReceiver::staticDlgProc,
reinterpret_cast<LPARAM>(
reinterpret_cast<void*>(this)));
static_cast<LPARAM>(
static_cast<void*>(this)));
// window should appear on top of everything, including (especially)
// the task bar.
@@ -354,16 +354,16 @@ MSWindowsPortableTaskBarReceiver::staticDlgProc(HWND hwnd,
// and put it in the extra window data then forward the call.
MSWindowsPortableTaskBarReceiver* self = NULL;
if (msg == WM_INITDIALOG) {
self = reinterpret_cast<MSWindowsPortableTaskBarReceiver*>(
reinterpret_cast<void*>(lParam));
self = static_cast<MSWindowsPortableTaskBarReceiver*>(
static_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);
if (data != 0) {
self = reinterpret_cast<MSWindowsPortableTaskBarReceiver*>(
reinterpret_cast<void*>(data));
self = static_cast<MSWindowsPortableTaskBarReceiver*>(
static_cast<void*>(data));
}
}

View File

@@ -252,7 +252,7 @@ MSWindowsServerTaskBarReceiver::primaryAction()
const IArchTaskBarReceiver::Icon
MSWindowsServerTaskBarReceiver::getIcon() const
{
return reinterpret_cast<Icon>(m_icon[getStatus()]);
return static_cast<Icon>(m_icon[getStatus()]);
}
void
@@ -294,7 +294,7 @@ MSWindowsServerTaskBarReceiver::loadIcon(UINT id)
IMAGE_ICON,
0, 0,
LR_DEFAULTCOLOR);
return reinterpret_cast<HICON>(icon);
return static_cast<HICON>(icon);
}
void
@@ -318,8 +318,8 @@ MSWindowsServerTaskBarReceiver::createWindow()
MAKEINTRESOURCE(IDD_TASKBAR_STATUS),
NULL,
(DLGPROC)&MSWindowsServerTaskBarReceiver::staticDlgProc,
reinterpret_cast<LPARAM>(
reinterpret_cast<void*>(this)));
static_cast<LPARAM>(
static_cast<void*>(this)));
// window should appear on top of everything, including (especially)
// the task bar.
@@ -368,16 +368,16 @@ MSWindowsServerTaskBarReceiver::staticDlgProc(HWND hwnd,
// and put it in the extra window data then forward the call.
MSWindowsServerTaskBarReceiver* self = NULL;
if (msg == WM_INITDIALOG) {
self = reinterpret_cast<MSWindowsServerTaskBarReceiver*>(
reinterpret_cast<void*>(lParam));
self = static_cast<MSWindowsServerTaskBarReceiver*>(
static_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);
if (data != 0) {
self = reinterpret_cast<MSWindowsServerTaskBarReceiver*>(
reinterpret_cast<void*>(data));
self = static_cast<MSWindowsServerTaskBarReceiver*>(
static_cast<void*>(data));
}
}