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:
Tillmann Karras 2014-03-09 21:14:26 +01:00
parent f28116b7da
commit d802d39281
292 changed files with 1526 additions and 1526 deletions

View file

@ -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;
}
}