Replace useless reinterpret_cast by static_cast

Former-commit-id: f61d644d968d4fe9523a5cd122e11525a9c2765d
This commit is contained in:
Lynix
2016-04-07 04:20:18 +02:00
parent 9efed23cbc
commit a31a969409
17 changed files with 42 additions and 42 deletions

View File

@@ -213,7 +213,7 @@ namespace Nz
Vector2i EventImpl::GetMousePosition(const Window& relativeTo)
{
HWND handle = reinterpret_cast<HWND>(relativeTo.GetHandle());
HWND handle = static_cast<HWND>(relativeTo.GetHandle());
if (handle)
{
POINT pos;
@@ -283,7 +283,7 @@ namespace Nz
void EventImpl::SetMousePosition(int x, int y, const Window& relativeTo)
{
HWND handle = reinterpret_cast<HWND>(relativeTo.GetHandle());
HWND handle = static_cast<HWND>(relativeTo.GetHandle());
if (handle)
{
POINT pos = {x, y};

View File

@@ -193,7 +193,7 @@ namespace Nz
bool WindowImpl::Create(WindowHandle handle)
{
m_handle = reinterpret_cast<HWND>(handle);
m_handle = static_cast<HWND>(handle);
if (!m_handle || !IsWindow(m_handle))
{
@@ -342,7 +342,7 @@ namespace Nz
#endif
if (cursor != WindowCursor_None)
m_cursor = reinterpret_cast<HCURSOR>(LoadImage(nullptr, windowsCursors[cursor], IMAGE_CURSOR, 0, 0, LR_SHARED));
m_cursor = static_cast<HCURSOR>(LoadImage(nullptr, windowsCursors[cursor], IMAGE_CURSOR, 0, 0, LR_SHARED));
else
m_cursor = nullptr;
@@ -1125,7 +1125,7 @@ namespace Nz
WindowImpl* me;
if (message == WM_CREATE)
{
me = reinterpret_cast<WindowImpl*>(reinterpret_cast<CREATESTRUCT*>(lParam)->lpCreateParams);
me = static_cast<WindowImpl*>(reinterpret_cast<CREATESTRUCT*>(lParam)->lpCreateParams);
SetWindowLongPtr(window, GWL_USERDATA, reinterpret_cast<LONG_PTR>(me));
}
else