From 8ef3cacc332c004a364e1e65c308e2892058905f Mon Sep 17 00:00:00 2001 From: ruevs Date: Wed, 18 Dec 2019 17:10:37 +0200 Subject: [PATCH] Fix a bug with 3Dconnexion: SpaceMouse A warning found with /W4 by MSVC 2019 (Microsoft (R) C/C++ Optimizing Compiler Version 19.24.28314) is an actual bug. How does the SpaceMouse (I do not have one) work at all when the global `hSpaceWareDriverClass` is NULL?! .\src\platform\guiwin.cpp(1392,34): warning C4459: declaration of 'hSpaceWareDriverClass' hides global declaration .\src\platform\guiwin.cpp(1389,13): message : see declaration of 'SolveSpace::Platform::hSpaceWareDriverClass' --- src/platform/guiwin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/guiwin.cpp b/src/platform/guiwin.cpp index 8a54deed..70160bbc 100644 --- a/src/platform/guiwin.cpp +++ b/src/platform/guiwin.cpp @@ -1389,7 +1389,7 @@ WindowRef CreateWindow(Window::Kind kind, WindowRef parentWindow) { static HWND hSpaceWareDriverClass; void Open3DConnexion() { - HWND hSpaceWareDriverClass = FindWindowW(L"SpaceWare Driver Class", NULL); + hSpaceWareDriverClass = FindWindowW(L"SpaceWare Driver Class", NULL); if(hSpaceWareDriverClass != NULL) { SiInitialize(); }