Browse Source

Fix 'zero as null pointer constant' warning

Scanning dependencies of target MagnumWindowlessWglApplication
[ 30%] Building CXX object src/Magnum/Platform/CMakeFiles/MagnumWindowlessWglApplication.dir/WindowlessWglApplication.cpp.obj
C:\Users\LB\Code\Magnum\build\Magnum-prefix\src\Magnum\src\Magnum\Platform\WindowlessWglApplication.cpp: In member function 'bool Magnum::Platform::WindowlessWglApplication::tryCreateContext(const Magnum::Platform::WindowlessWglApplication::Configuration&)':
C:\Users\LB\Code\Magnum\build\Magnum-prefix\src\Magnum\src\Magnum\Platform\WindowlessWglApplication.cpp:124:81: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
     _renderingContext = wglCreateContextAttribsARB(_deviceContext, 0, attributes);
                                                                                 ^
[ 30%] Linking CXX static library libMagnumWindowlessWglApplication.a
[ 30%] Built target MagnumWindowlessWglApplication
pull/138/head
Nicholas "LB" Braden 10 years ago
parent
commit
f9ead4ef83
  1. 2
      src/Magnum/Platform/WindowlessWglApplication.cpp

2
src/Magnum/Platform/WindowlessWglApplication.cpp

@ -121,7 +121,7 @@ bool WindowlessWglApplication::tryCreateContext(const Configuration& configurati
with it */ with it */
typedef HGLRC(WINAPI*PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC, HGLRC, const int*); typedef HGLRC(WINAPI*PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC, HGLRC, const int*);
const PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB = reinterpret_cast<PFNWGLCREATECONTEXTATTRIBSARBPROC>( wglGetProcAddress(reinterpret_cast<LPCSTR>("wglCreateContextAttribsARB"))); const PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB = reinterpret_cast<PFNWGLCREATECONTEXTATTRIBSARBPROC>( wglGetProcAddress(reinterpret_cast<LPCSTR>("wglCreateContextAttribsARB")));
_renderingContext = wglCreateContextAttribsARB(_deviceContext, 0, attributes); _renderingContext = wglCreateContextAttribsARB(_deviceContext, nullptr, attributes);
/* Delete the temporary context */ /* Delete the temporary context */
wglMakeCurrent(_deviceContext, nullptr); wglMakeCurrent(_deviceContext, nullptr);

Loading…
Cancel
Save