mirror of
https://github.com/tiennm99/godot.git
synced 2026-08-22 22:24:04 +00:00
Replace NULL with nullptr
This commit is contained in:
@@ -52,7 +52,7 @@ typedef HGLRC(APIENTRY *PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC, HGLRC, const int
|
||||
|
||||
void ContextGL_Windows::release_current() {
|
||||
|
||||
wglMakeCurrent(hDC, NULL);
|
||||
wglMakeCurrent(hDC, nullptr);
|
||||
}
|
||||
|
||||
void ContextGL_Windows::make_current() {
|
||||
@@ -185,10 +185,10 @@ Error ContextGL_Windows::initialize() {
|
||||
0
|
||||
}; //zero indicates the end of the array
|
||||
|
||||
PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB = NULL; //pointer to the method
|
||||
PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB = nullptr; //pointer to the method
|
||||
wglCreateContextAttribsARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC)wglGetProcAddress("wglCreateContextAttribsARB");
|
||||
|
||||
if (wglCreateContextAttribsARB == NULL) //OpenGL 3.0 is not supported
|
||||
if (wglCreateContextAttribsARB == nullptr) //OpenGL 3.0 is not supported
|
||||
{
|
||||
wglDeleteContext(hRC);
|
||||
return ERR_CANT_CREATE;
|
||||
@@ -199,7 +199,7 @@ Error ContextGL_Windows::initialize() {
|
||||
wglDeleteContext(hRC);
|
||||
return ERR_CANT_CREATE; // Return false
|
||||
}
|
||||
wglMakeCurrent(hDC, NULL);
|
||||
wglMakeCurrent(hDC, nullptr);
|
||||
wglDeleteContext(hRC);
|
||||
hRC = new_hRC;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user