]> git.tdb.fi Git - libs/gui.git/blobdiff - source/graphics/wgl/glcontext.cpp
Use nullptr in place of 0 or NULL
[libs/gui.git] / source / graphics / wgl / glcontext.cpp
index b0f685b582a835e38b9639073c6da8564b855e32..3627a17ff286ca6494c2e81cdf7e6f2051208d25 100644 (file)
@@ -1,10 +1,10 @@
+#include "glcontext.h"
 #include <vector>
 #include <windows.h>
 #include <GL/gl.h>
 #include <GL/wglext.h>
 #include <msp/strings/lexicalcast.h>
 #include <msp/strings/utils.h>
-#include "glcontext.h"
 #include "window_private.h"
 
 using namespace std;
@@ -26,7 +26,7 @@ typedef HGLRC ContextHandle;
 
 struct GLContext::Private
 {
-       ContextHandle context;
+       ContextHandle context = nullptr;
 };
 
 
@@ -107,7 +107,7 @@ void GLContext::platform_init(const GLOptions &opts)
                if(!priv->context)
                        throw unsupported_gl_mode(opts);
 
-               wglMakeCurrent(0, 0);
+               wglMakeCurrent(nullptr, nullptr);
                wglDeleteContext(fake_context);
        }
        else
@@ -119,7 +119,7 @@ void GLContext::platform_init(const GLOptions &opts)
 
 GLContext::~GLContext()
 {
-       wglMakeCurrent(0, 0);
+       wglMakeCurrent(nullptr, nullptr);
        wglDeleteContext(priv->context);
 
        delete priv;