From 311c7d578e5bb0aa000d759c6a5b839c97ac6c2d Mon Sep 17 00:00:00 2001 From: Christian Grasser Date: Wed, 27 May 2015 22:47:40 +0200 Subject: [PATCH] Further x86, x64 compatibility fix by reinterpret_cast instead of reinterpret_cast for SetWindowLongPtr --- PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp | 8 ++++---- PowerEditor/src/WinControls/DocumentMap/documentMap.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp index 7e25f2f8f..b77f27ec5 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp @@ -258,15 +258,15 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere) //Use either Unicode or ANSI setwindowlong, depending on environment if (::IsWindowUnicode(_hSelf)) { - ::SetWindowLongPtrW(_hSelf, GWLP_USERDATA, reinterpret_cast(this)); + ::SetWindowLongPtrW(_hSelf, GWLP_USERDATA, reinterpret_cast(this)); _callWindowProc = CallWindowProcW; - _scintillaDefaultProc = reinterpret_cast(::SetWindowLongPtrW(_hSelf, GWLP_WNDPROC, reinterpret_cast(scintillaStatic_Proc))); + _scintillaDefaultProc = reinterpret_cast(::SetWindowLongPtrW(_hSelf, GWLP_WNDPROC, reinterpret_cast(scintillaStatic_Proc))); } else { - ::SetWindowLongPtrA(_hSelf, GWLP_USERDATA, reinterpret_cast(this)); + ::SetWindowLongPtrA(_hSelf, GWLP_USERDATA, reinterpret_cast(this)); _callWindowProc = CallWindowProcA; - _scintillaDefaultProc = reinterpret_cast(::SetWindowLongPtrA(_hSelf, GWLP_WNDPROC, reinterpret_cast(scintillaStatic_Proc))); + _scintillaDefaultProc = reinterpret_cast(::SetWindowLongPtrA(_hSelf, GWLP_WNDPROC, reinterpret_cast(scintillaStatic_Proc))); } //Get the startup document and make a buffer for it so it can be accessed like a file diff --git a/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp b/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp index c60061d85..650d024f5 100644 --- a/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp +++ b/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp @@ -440,8 +440,8 @@ BOOL CALLBACK ViewZoneDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPara case WM_INITDIALOG : { _viewZoneCanvas = ::GetDlgItem(_hSelf, IDC_VIEWZONECANVAS); - ::SetWindowLongPtrW(_viewZoneCanvas, GWLP_USERDATA, reinterpret_cast(this)); - _canvasDefaultProc = reinterpret_cast(::SetWindowLongPtr(_viewZoneCanvas, GWLP_WNDPROC, reinterpret_cast(canvasStaticProc))); + ::SetWindowLongPtrW(_viewZoneCanvas, GWLP_USERDATA, reinterpret_cast(this)); + _canvasDefaultProc = reinterpret_cast(::SetWindowLongPtr(_viewZoneCanvas, GWLP_WNDPROC, reinterpret_cast(canvasStaticProc))); return TRUE; }