The big NULL replacement party part 5.
Right. ' = NULL' would get a lot of these.
This commit is contained in:
@@ -293,7 +293,7 @@ void RenderTarget_MacOSX::FinishRenderingTo()
|
||||
}
|
||||
|
||||
|
||||
LowLevelWindow_MacOSX::LowLevelWindow_MacOSX() : m_Context(nil), m_BGContext(nil), m_CurrentDisplayMode(NULL), m_DisplayID(0)
|
||||
LowLevelWindow_MacOSX::LowLevelWindow_MacOSX() : m_Context(nil), m_BGContext(nil), m_CurrentDisplayMode(nullptr), m_DisplayID(0)
|
||||
{
|
||||
POOL;
|
||||
m_WindowDelegate = [[SMWindowDelegate alloc] init];
|
||||
@@ -323,7 +323,7 @@ void *LowLevelWindow_MacOSX::GetProcAddress( RString s )
|
||||
// Both functions mentioned in there are deprecated in 10.4.
|
||||
const RString& symbolName( '_' + s );
|
||||
const uint32_t count = _dyld_image_count();
|
||||
NSSymbol symbol = NULL;
|
||||
NSSymbol symbol = nullptr;
|
||||
const uint32_t options = NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR;
|
||||
|
||||
for( uint32_t i = 0; i < count && !symbol; ++i )
|
||||
@@ -462,13 +462,13 @@ void LowLevelWindow_MacOSX::ShutDownFullScreen()
|
||||
ASSERT( err == kCGErrorSuccess );
|
||||
SetActualParamsFromMode( m_CurrentDisplayMode );
|
||||
// We don't own this so we cannot release it.
|
||||
m_CurrentDisplayMode = NULL;
|
||||
m_CurrentDisplayMode = nullptr;
|
||||
m_CurrentParams.windowed = true;
|
||||
}
|
||||
|
||||
int LowLevelWindow_MacOSX::ChangeDisplayMode( const VideoModeParams& p )
|
||||
{
|
||||
CFDictionaryRef mode = NULL;
|
||||
CFDictionaryRef mode = nullptr;
|
||||
CFDictionaryRef newMode;
|
||||
CGDisplayErr err;
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
#include <GL/glew.h>
|
||||
|
||||
static PIXELFORMATDESCRIPTOR g_CurrentPixelFormat;
|
||||
static HGLRC g_HGLRC = NULL;
|
||||
static HGLRC g_HGLRC_Background = NULL;
|
||||
static HGLRC g_HGLRC = nullptr;
|
||||
static HGLRC g_HGLRC_Background = nullptr;
|
||||
|
||||
static void DestroyGraphicsWindowAndOpenGLContext()
|
||||
{
|
||||
@@ -22,13 +22,13 @@ static void DestroyGraphicsWindowAndOpenGLContext()
|
||||
{
|
||||
wglMakeCurrent( NULL, NULL );
|
||||
wglDeleteContext( g_HGLRC );
|
||||
g_HGLRC = NULL;
|
||||
g_HGLRC = nullptr;
|
||||
}
|
||||
|
||||
if( g_HGLRC_Background != nullptr )
|
||||
{
|
||||
wglDeleteContext( g_HGLRC_Background );
|
||||
g_HGLRC_Background = NULL;
|
||||
g_HGLRC_Background = nullptr;
|
||||
}
|
||||
|
||||
ZERO( g_CurrentPixelFormat );
|
||||
@@ -42,7 +42,7 @@ void *LowLevelWindow_Win32::GetProcAddress( RString s )
|
||||
if( pRet != nullptr )
|
||||
return pRet;
|
||||
|
||||
return ::GetProcAddress( GetModuleHandle(NULL), s );
|
||||
return ::GetProcAddress( GetModuleHandle(nullptr), s );
|
||||
}
|
||||
|
||||
LowLevelWindow_Win32::LowLevelWindow_Win32()
|
||||
@@ -186,9 +186,9 @@ RString LowLevelWindow_Win32::TryVideoMode( const VideoModeParams &p, bool &bNew
|
||||
{
|
||||
wglMakeCurrent( NULL, NULL );
|
||||
wglDeleteContext( g_HGLRC );
|
||||
g_HGLRC = NULL;
|
||||
g_HGLRC = nullptr;
|
||||
wglDeleteContext( g_HGLRC_Background );
|
||||
g_HGLRC_Background = NULL;
|
||||
g_HGLRC_Background = nullptr;
|
||||
}
|
||||
|
||||
bNewDeviceOut = true;
|
||||
@@ -234,7 +234,7 @@ RString LowLevelWindow_Win32::TryVideoMode( const VideoModeParams &p, bool &bNew
|
||||
{
|
||||
LOG->Warn( werr_ssprintf(GetLastError(), "wglShareLists failed") );
|
||||
wglDeleteContext( g_HGLRC_Background );
|
||||
g_HGLRC_Background = NULL;
|
||||
g_HGLRC_Background = nullptr;
|
||||
}
|
||||
|
||||
if( !wglMakeCurrent( GraphicsWindow::GetHDC(), g_HGLRC ) )
|
||||
@@ -323,8 +323,8 @@ RenderTarget_Win32::RenderTarget_Win32(LowLevelWindow_Win32 *pWind)
|
||||
{
|
||||
m_pWind = pWind;
|
||||
m_texHandle = 0;
|
||||
m_hOldDeviceContext = NULL;
|
||||
m_hOldRenderContext = NULL;
|
||||
m_hOldDeviceContext = nullptr;
|
||||
m_hOldRenderContext = nullptr;
|
||||
}
|
||||
|
||||
RenderTarget_Win32::~RenderTarget_Win32()
|
||||
|
||||
@@ -24,12 +24,12 @@ using namespace X11Helper;
|
||||
#include <X11/extensions/XTest.h>
|
||||
#endif
|
||||
|
||||
static GLXContext g_pContext = NULL;
|
||||
static GLXContext g_pBackgroundContext = NULL;
|
||||
static GLXContext g_pContext = nullptr;
|
||||
static GLXContext g_pBackgroundContext = nullptr;
|
||||
static Window g_AltWindow = None;
|
||||
static Rotation g_OldRotation;
|
||||
static int g_iOldSize;
|
||||
XRRScreenConfiguration *g_pScreenConfig = NULL;
|
||||
XRRScreenConfiguration *g_pScreenConfig = nullptr;
|
||||
|
||||
static LocalizedString FAILED_CONNECTION_XSERVER( "LowLevelWindow_X11", "Failed to establish a connection with the X server" );
|
||||
LowLevelWindow_X11::LowLevelWindow_X11()
|
||||
@@ -65,15 +65,15 @@ LowLevelWindow_X11::~LowLevelWindow_X11()
|
||||
if( g_pContext )
|
||||
{
|
||||
glXDestroyContext( Dpy, g_pContext );
|
||||
g_pContext = NULL;
|
||||
g_pContext = nullptr;
|
||||
}
|
||||
if( g_pBackgroundContext )
|
||||
{
|
||||
glXDestroyContext( Dpy, g_pBackgroundContext );
|
||||
g_pBackgroundContext = NULL;
|
||||
g_pBackgroundContext = nullptr;
|
||||
}
|
||||
XRRFreeScreenConfigInfo( g_pScreenConfig );
|
||||
g_pScreenConfig = NULL;
|
||||
g_pScreenConfig = nullptr;
|
||||
|
||||
XDestroyWindow( Dpy, Win );
|
||||
Win = None;
|
||||
@@ -379,9 +379,9 @@ RenderTarget_X11::RenderTarget_X11( LowLevelWindow_X11 *pWind )
|
||||
{
|
||||
m_pWind = pWind;
|
||||
m_iPbuffer = 0;
|
||||
m_pPbufferContext = NULL;
|
||||
m_pPbufferContext = nullptr;
|
||||
m_iTexHandle = 0;
|
||||
m_pOldContext = NULL;
|
||||
m_pOldContext = nullptr;
|
||||
m_pOldDrawable = 0;
|
||||
}
|
||||
|
||||
@@ -496,7 +496,7 @@ void RenderTarget_X11::FinishRenderingTo()
|
||||
glBindTexture( GL_TEXTURE_2D, 0 );
|
||||
|
||||
glXMakeCurrent( Dpy, m_pOldDrawable, m_pOldContext );
|
||||
m_pOldContext = NULL;
|
||||
m_pOldContext = nullptr;
|
||||
m_pOldDrawable = 0;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user