From 9c3c035ceac96b67f727844823705acce0eb776e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 30 Jun 2019 18:36:18 +0200 Subject: Clean up redundant wrappers around SetWindowLongPtr --- pugl/pugl_win.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/pugl/pugl_win.cpp b/pugl/pugl_win.cpp index dabaa69..1933586 100644 --- a/pugl/pugl_win.cpp +++ b/pugl/pugl_win.cpp @@ -38,14 +38,8 @@ #ifndef WHEEL_DELTA # define WHEEL_DELTA 120 #endif -#ifdef _WIN64 -# ifndef GWLP_USERDATA -# define GWLP_USERDATA (-21) -# endif -#else -# ifndef GWL_USERDATA -# define GWL_USERDATA (-21) -# endif +#ifndef GWLP_USERDATA +# define GWLP_USERDATA (-21) #endif #define PUGL_LOCAL_CLOSE_MSG (WM_USER + 50) @@ -327,11 +321,7 @@ puglCreateWindow(PuglView* view, const char* title) QueryPerformanceFrequency(&frequency); impl->timerFrequency = static_cast(frequency.QuadPart); -#ifdef _WIN64 SetWindowLongPtr(impl->hwnd, GWLP_USERDATA, (LONG_PTR)view); -#else - SetWindowLongPtr(impl->hwnd, GWL_USERDATA, (LONG)view); -#endif return 0; } @@ -743,11 +733,7 @@ puglProcessEvents(PuglView* view) LRESULT CALLBACK wndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { -#ifdef _WIN64 PuglView* view = (PuglView*)GetWindowLongPtr(hwnd, GWLP_USERDATA); -#else - PuglView* view = (PuglView*)GetWindowLongPtr(hwnd, GWL_USERDATA); -#endif switch (message) { case WM_CREATE: -- cgit v1.2.1