summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/GLInterface/WGL.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/WGL.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/WGL.cpp')
-rw-r--r--Source/Core/DolphinWX/GLInterface/WGL.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/Core/DolphinWX/GLInterface/WGL.cpp b/Source/Core/DolphinWX/GLInterface/WGL.cpp
index db3bc3d0f1..69a8e44924 100644
--- a/Source/Core/DolphinWX/GLInterface/WGL.cpp
+++ b/Source/Core/DolphinWX/GLInterface/WGL.cpp
@@ -11,13 +11,13 @@
#include "VideoCommon/VertexShaderManager.h"
#include "VideoCommon/VideoConfig.h"
-static HDC hDC = NULL; // Private GDI Device Context
-static HGLRC hRC = NULL; // Permanent Rendering Context
-static HINSTANCE dllHandle = NULL; // Handle to OpenGL32.dll
+static HDC hDC = nullptr; // Private GDI Device Context
+static HGLRC hRC = nullptr; // Permanent Rendering Context
+static HINSTANCE dllHandle = nullptr; // Handle to OpenGL32.dll
// typedef from wglext.h
typedef BOOL(WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
-static PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = NULL;
+static PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = nullptr;
void cInterfaceWGL::SwapInterval(int Interval)
{
@@ -34,9 +34,9 @@ void cInterfaceWGL::Swap()
void* cInterfaceWGL::GetFuncAddress(std::string name)
{
void* func = (void*)wglGetProcAddress((LPCSTR)name.c_str());
- if (func == NULL)
+ if (func == nullptr)
func = (void*)GetProcAddress(dllHandle, (LPCSTR)name.c_str());
- return func;
+ return func;
}
// Draw messages on top of the screen
@@ -78,7 +78,7 @@ bool cInterfaceWGL::Create(void *&window_handle)
#endif
window_handle = (void*)EmuWindow::Create((HWND)window_handle, GetModuleHandle(0), _T("Please wait..."));
- if (window_handle == NULL)
+ if (window_handle == nullptr)
{
Host_SysMessage("failed to create window");
return false;
@@ -138,7 +138,7 @@ bool cInterfaceWGL::MakeCurrent()
bool cInterfaceWGL::ClearCurrent()
{
- bool success = wglMakeCurrent(hDC, NULL) ? true : false;
+ bool success = wglMakeCurrent(hDC, nullptr) ? true : false;
if (success)
{
// Grab the swap interval function pointer
@@ -183,19 +183,19 @@ void cInterfaceWGL::Shutdown()
{
if (hRC)
{
- if (!wglMakeCurrent(NULL, NULL))
+ if (!wglMakeCurrent(nullptr, nullptr))
NOTICE_LOG(VIDEO, "Could not release drawing context.");
if (!wglDeleteContext(hRC))
ERROR_LOG(VIDEO, "Attempt to release rendering context failed.");
- hRC = NULL;
+ hRC = nullptr;
}
if (hDC && !ReleaseDC(EmuWindow::GetWnd(), hDC))
{
ERROR_LOG(VIDEO, "Attempt to release device context failed.");
- hDC = NULL;
+ hDC = nullptr;
}
}