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

@ -100,7 +100,7 @@ void SWBPWritten(int address, int newvalue)
u32 tlutTMemAddr = (newvalue & 0x3FF) << 9;
u32 tlutXferCount = (newvalue & 0x1FFC00) >> 5;
u8 *ptr = 0;
u8 *ptr = nullptr;
// TODO - figure out a cleaner way.
if (Core::g_CoreStartupParameter.bWii)

View File

@ -39,7 +39,7 @@ void Init()
{
memset(ObjectBuffer[i], 0, sizeof(ObjectBuffer[i]));
DrawnToBuffer[i] = false;
ObjectBufferName[i] = 0;
ObjectBufferName[i] = nullptr;
BufferBase[i] = 0;
}
}

View File

@ -19,7 +19,7 @@ typedef void (*DecodingFunction)(u32);
namespace OpcodeDecoder
{
static DecodingFunction currentFunction = NULL;
static DecodingFunction currentFunction = nullptr;
static u32 minCommandSize;
static u16 streamSize;
static u16 streamAddress;

View File

@ -101,7 +101,7 @@ void Init()
interruptSet = false;
interruptWaiting = false;
g_pVideoData = 0;
g_pVideoData = nullptr;
g_bSkipCurrentFrame = false;
}

View File

@ -28,7 +28,7 @@ static std::string s_sScreenshotName;
// Rasterfont isn't compatible with GLES
// degasus: I think it does, but I can't test it
RasterFont* s_pfont = NULL;
RasterFont* s_pfont = nullptr;
void SWRenderer::Init()
{
@ -44,7 +44,7 @@ void SWRenderer::Shutdown()
if (GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGL)
{
delete s_pfont;
s_pfont = 0;
s_pfont = nullptr;
}
}

View File

@ -40,7 +40,7 @@ SWVertexLoader::SWVertexLoader() :
SWVertexLoader::~SWVertexLoader()
{
delete m_SetupUnit;
m_SetupUnit = NULL;
m_SetupUnit = nullptr;
}
void SWVertexLoader::SetFormat(u8 attributeIndex, u8 primitiveType)
@ -89,8 +89,8 @@ void SWVertexLoader::SetFormat(u8 attributeIndex, u8 primitiveType)
m_VertexSize = 0;
// Reset pipeline
m_positionLoader = NULL;
m_normalLoader = NULL;
m_positionLoader = nullptr;
m_normalLoader = nullptr;
m_NumAttributeLoaders = 0;
// Reset vertex
@ -164,7 +164,7 @@ void SWVertexLoader::SetFormat(u8 attributeIndex, u8 primitiveType)
m_normalLoader = VertexLoader_Normal::GetFunction(g_VtxDesc.Normal,
m_CurrentVat->g0.NormalFormat, m_CurrentVat->g0.NormalElements, m_CurrentVat->g0.NormalIndex3);
if (m_normalLoader == 0)
if (m_normalLoader == nullptr)
{
ERROR_LOG(VIDEO, "VertexLoader_Normal::GetFunction returned zero!");
}
@ -176,7 +176,7 @@ void SWVertexLoader::SetFormat(u8 attributeIndex, u8 primitiveType)
switch (colDesc[i])
{
case NOT_PRESENT:
m_colorLoader[i] = NULL;
m_colorLoader[i] = nullptr;
break;
case DIRECT:
switch (colComp[i])

View File

@ -60,7 +60,7 @@ std::string VideoSoftware::GetName()
void *DllDebugger(void *_hParent, bool Show)
{
return NULL;
return nullptr;
}
void VideoSoftware::ShowConfig(void *_hParent)

View File

@ -106,7 +106,7 @@ void SampleMip(s32 s, s32 t, s32 mip, bool linear, u8 texmap, u8 *sample)
TexImage0& ti0 = texUnit.texImage0[subTexmap];
TexTLUT& texTlut = texUnit.texTlut[subTexmap];
u8 *imageSrc, *imageSrcOdd = NULL;
u8 *imageSrc, *imageSrcOdd = nullptr;
if (texUnit.texImage1[subTexmap].image_type)
{
imageSrc = &texMem[texUnit.texImage1[subTexmap].tmem_even * TMEM_LINE_SIZE];