summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/GLInterface/GLX.cpp
diff options
context:
space:
mode:
authorTillmann Karras <tilkax@gmail.com>2014-03-09 21:14:26 +0100
committerTillmann Karras <tilkax@gmail.com>2014-03-09 21:14:26 +0100
commitd802d392811be44d34ae9cd23f616db93e54c50f (patch)
treef9aa8831a0731ea246bd921d979f4bffa7f07bd0 /Source/Core/DolphinWX/GLInterface/GLX.cpp
parentf28116b7da6aac6069084596dc4dbf866bdebfd8 (diff)
clang-modernize -use-nullptr
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
Diffstat (limited to 'Source/Core/DolphinWX/GLInterface/GLX.cpp')
-rw-r--r--Source/Core/DolphinWX/GLInterface/GLX.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/Core/DolphinWX/GLInterface/GLX.cpp b/Source/Core/DolphinWX/GLInterface/GLX.cpp
index ce61989efa..2735eb2b6e 100644
--- a/Source/Core/DolphinWX/GLInterface/GLX.cpp
+++ b/Source/Core/DolphinWX/GLInterface/GLX.cpp
@@ -10,7 +10,7 @@
#include "VideoCommon/VideoConfig.h"
typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
-PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI = NULL;
+PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI = nullptr;
// Show the current FPS
void cInterfaceGLX::UpdateFPSDisplay(const char *text)
@@ -71,8 +71,8 @@ bool cInterfaceGLX::Create(void *&window_handle)
GLX_DOUBLEBUFFER,
None };
- GLWin.dpy = XOpenDisplay(0);
- GLWin.evdpy = XOpenDisplay(0);
+ GLWin.dpy = XOpenDisplay(nullptr);
+ GLWin.evdpy = XOpenDisplay(nullptr);
GLWin.parent = (Window)window_handle;
GLWin.screen = DefaultScreen(GLWin.dpy);
if (GLWin.parent == 0)
@@ -83,17 +83,17 @@ bool cInterfaceGLX::Create(void *&window_handle)
// Get an appropriate visual
GLWin.vi = glXChooseVisual(GLWin.dpy, GLWin.screen, attrListDbl);
- if (GLWin.vi == NULL)
+ if (GLWin.vi == nullptr)
{
GLWin.vi = glXChooseVisual(GLWin.dpy, GLWin.screen, attrListSgl);
- if (GLWin.vi != NULL)
+ if (GLWin.vi != nullptr)
{
ERROR_LOG(VIDEO, "Only single buffered visual!");
}
else
{
GLWin.vi = glXChooseVisual(GLWin.dpy, GLWin.screen, attrListDefault);
- if (GLWin.vi == NULL)
+ if (GLWin.vi == nullptr)
{
ERROR_LOG(VIDEO, "Could not choose visual (glXChooseVisual)");
return false;
@@ -104,7 +104,7 @@ bool cInterfaceGLX::Create(void *&window_handle)
NOTICE_LOG(VIDEO, "Got double buffered visual!");
// Create a GLX context.
- GLWin.ctx = glXCreateContext(GLWin.dpy, GLWin.vi, 0, GL_TRUE);
+ GLWin.ctx = glXCreateContext(GLWin.dpy, GLWin.vi, nullptr, GL_TRUE);
if (!GLWin.ctx)
{
PanicAlert("Unable to create GLX context.");
@@ -142,7 +142,7 @@ bool cInterfaceGLX::MakeCurrent()
bool cInterfaceGLX::ClearCurrent()
{
- return glXMakeCurrent(GLWin.dpy, None, NULL);
+ return glXMakeCurrent(GLWin.dpy, None, nullptr);
}
@@ -155,7 +155,7 @@ void cInterfaceGLX::Shutdown()
glXDestroyContext(GLWin.dpy, GLWin.ctx);
XCloseDisplay(GLWin.dpy);
XCloseDisplay(GLWin.evdpy);
- GLWin.ctx = NULL;
+ GLWin.ctx = nullptr;
}
}