mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 17:32:30 +00:00
clang-modernize -use-nullptr
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
This commit is contained in:
parent
f28116b7da
commit
d802d39281
292 changed files with 1526 additions and 1526 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue