chore(ui): replace remaining NULLs with nullptr

This commit is contained in:
fallenoak 2023-01-04 20:05:48 -06:00
parent d61f0faef1
commit 90403bfd29
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
7 changed files with 13 additions and 13 deletions

View File

@ -27,11 +27,11 @@ CScriptObject* CScriptObject::GetScriptObjectByName(const char* name, int32_t ty
if (v4 && v4->IsA(type)) { if (v4 && v4->IsA(type)) {
return v4; return v4;
} else { } else {
return NULL; return nullptr;
} }
} else { } else {
lua_settop(L, -2); lua_settop(L, -2);
return NULL; return nullptr;
} }
} }

View File

@ -21,7 +21,7 @@ class CScriptRegion : public CScriptObject, public CLayoutFrame {
static int32_t GetObjectType(); static int32_t GetObjectType();
// Member variables // Member variables
CSimpleFrame* m_parent = NULL; // TODO verify type CSimpleFrame* m_parent = nullptr; // TODO verify type
// Virtual member functions // Virtual member functions
virtual bool IsA(int32_t type); virtual bool IsA(int32_t type);

View File

@ -95,7 +95,7 @@ void CSimpleFrame::LoadXML(XMLNode* node, CStatus* status) {
if (inherits && *inherits) { if (inherits && *inherits) {
do { do {
SStrTokenize(v68, inheritName, 0x400u, " ,", NULL); SStrTokenize(v68, inheritName, 0x400u, " ,", nullptr);
if (!*inheritName) { if (!*inheritName) {
break; break;
@ -626,7 +626,7 @@ FrameScript_Object::ScriptIx* CSimpleFrame::GetScriptByName(const char* name, Fr
return &this->m_onDisable; return &this->m_onDisable;
} }
return NULL; return nullptr;
} }
int32_t CSimpleFrame::GetScriptMetaTable() { int32_t CSimpleFrame::GetScriptMetaTable() {
@ -799,7 +799,7 @@ void CSimpleFrame::LoadXML_Scripts(XMLNode* root, CStatus* status) {
scriptFunction = new (scriptFunction) ScriptFunction(); scriptFunction = new (scriptFunction) ScriptFunction();
static_cast<ScriptFunction*>(scriptFunction)->luaRef = luaRef; static_cast<ScriptFunction*>(scriptFunction)->luaRef = luaRef;
} else { } else {
scriptFunction = NULL; scriptFunction = nullptr;
} }
node->m_userData = scriptFunction; node->m_userData = scriptFunction;
@ -840,7 +840,7 @@ void CSimpleFrame::LoadXML_Scripts(XMLNode* root, CStatus* status) {
script->luaRef = 0; script->luaRef = 0;
} }
script->unk = NULL; script->unk = nullptr;
if (!SStrCmpI(node->GetName(), "OnChar", 0x7FFFFFFFu) && !(this->m_eventmask & 1)) { if (!SStrCmpI(node->GetName(), "OnChar", 0x7FFFFFFFu) && !(this->m_eventmask & 1)) {
if (this->m_visible) { if (this->m_visible) {

View File

@ -28,8 +28,8 @@ class CSimpleFrame : public CScriptRegion {
static void RegisterScriptMethods(lua_State* L); static void RegisterScriptMethods(lua_State* L);
// Member variables // Member variables
CSimpleTop* m_top = NULL; CSimpleTop* m_top = nullptr;
CSimpleTitleRegion* m_titleRegion = NULL; CSimpleTitleRegion* m_titleRegion = nullptr;
int32_t m_intAC = 1; int32_t m_intAC = 1;
int32_t m_id = 0; int32_t m_id = 0;
uint32_t m_flags = 0; uint32_t m_flags = 0;

View File

@ -407,7 +407,7 @@ int32_t FrameScript_ExecuteFile(const char* filePath, const char* a2, MD5_CTX* m
void* fileBuffer; void* fileBuffer;
size_t fileBytes; size_t fileBytes;
if (SFile::Load(0, v4, &fileBuffer, &fileBytes, 0, 1, NULL)) { if (SFile::Load(0, v4, &fileBuffer, &fileBytes, 0, 1, nullptr)) {
if (md5) { if (md5) {
MD5Update(md5, static_cast<unsigned char*>(fileBuffer), fileBytes); MD5Update(md5, static_cast<unsigned char*>(fileBuffer), fileBytes);
} }

View File

@ -254,7 +254,7 @@ CSimpleFontString* LoadXML_String(XMLNode* node, CSimpleFrame* frame, CStatus* s
if (m) { if (m) {
fontString = new (m) CSimpleFontString(frame, 2, 1); fontString = new (m) CSimpleFontString(frame, 2, 1);
} else { } else {
fontString = NULL; fontString = nullptr;
} }
fontString->PreLoadXML(node, status); fontString->PreLoadXML(node, status);
@ -275,7 +275,7 @@ CSimpleTexture* LoadXML_Texture(XMLNode* node, CSimpleFrame* frame, CStatus* sta
if (m) { if (m) {
texture = new (m) CSimpleTexture(frame, 2, 1); texture = new (m) CSimpleTexture(frame, 2, 1);
} else { } else {
texture = NULL; texture = nullptr;
} }
texture->PreLoadXML(node, status); texture->PreLoadXML(node, status);

View File

@ -36,7 +36,7 @@ luaL_Reg FrameScriptInternal::extra_funcs[31] = {
{ "debugstack", &debugstack }, { "debugstack", &debugstack },
{ "debuglocals", &debuglocals }, { "debuglocals", &debuglocals },
{ "scrub", &scrub }, { "scrub", &scrub },
{ NULL, NULL } { nullptr, nullptr }
}; };
int32_t sub_8168D0(lua_State* L) { int32_t sub_8168D0(lua_State* L) {