mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-04-19 03:20:11 +03:00
chore(ui): replace remaining NULLs with nullptr
This commit is contained in:
parent
d61f0faef1
commit
90403bfd29
@ -27,11 +27,11 @@ CScriptObject* CScriptObject::GetScriptObjectByName(const char* name, int32_t ty
|
||||
if (v4 && v4->IsA(type)) {
|
||||
return v4;
|
||||
} else {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
} else {
|
||||
lua_settop(L, -2);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ class CScriptRegion : public CScriptObject, public CLayoutFrame {
|
||||
static int32_t GetObjectType();
|
||||
|
||||
// Member variables
|
||||
CSimpleFrame* m_parent = NULL; // TODO verify type
|
||||
CSimpleFrame* m_parent = nullptr; // TODO verify type
|
||||
|
||||
// Virtual member functions
|
||||
virtual bool IsA(int32_t type);
|
||||
|
@ -95,7 +95,7 @@ void CSimpleFrame::LoadXML(XMLNode* node, CStatus* status) {
|
||||
|
||||
if (inherits && *inherits) {
|
||||
do {
|
||||
SStrTokenize(v68, inheritName, 0x400u, " ,", NULL);
|
||||
SStrTokenize(v68, inheritName, 0x400u, " ,", nullptr);
|
||||
|
||||
if (!*inheritName) {
|
||||
break;
|
||||
@ -626,7 +626,7 @@ FrameScript_Object::ScriptIx* CSimpleFrame::GetScriptByName(const char* name, Fr
|
||||
return &this->m_onDisable;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int32_t CSimpleFrame::GetScriptMetaTable() {
|
||||
@ -799,7 +799,7 @@ void CSimpleFrame::LoadXML_Scripts(XMLNode* root, CStatus* status) {
|
||||
scriptFunction = new (scriptFunction) ScriptFunction();
|
||||
static_cast<ScriptFunction*>(scriptFunction)->luaRef = luaRef;
|
||||
} else {
|
||||
scriptFunction = NULL;
|
||||
scriptFunction = nullptr;
|
||||
}
|
||||
|
||||
node->m_userData = scriptFunction;
|
||||
@ -840,7 +840,7 @@ void CSimpleFrame::LoadXML_Scripts(XMLNode* root, CStatus* status) {
|
||||
script->luaRef = 0;
|
||||
}
|
||||
|
||||
script->unk = NULL;
|
||||
script->unk = nullptr;
|
||||
|
||||
if (!SStrCmpI(node->GetName(), "OnChar", 0x7FFFFFFFu) && !(this->m_eventmask & 1)) {
|
||||
if (this->m_visible) {
|
||||
|
@ -28,8 +28,8 @@ class CSimpleFrame : public CScriptRegion {
|
||||
static void RegisterScriptMethods(lua_State* L);
|
||||
|
||||
// Member variables
|
||||
CSimpleTop* m_top = NULL;
|
||||
CSimpleTitleRegion* m_titleRegion = NULL;
|
||||
CSimpleTop* m_top = nullptr;
|
||||
CSimpleTitleRegion* m_titleRegion = nullptr;
|
||||
int32_t m_intAC = 1;
|
||||
int32_t m_id = 0;
|
||||
uint32_t m_flags = 0;
|
||||
|
@ -407,7 +407,7 @@ int32_t FrameScript_ExecuteFile(const char* filePath, const char* a2, MD5_CTX* m
|
||||
void* fileBuffer;
|
||||
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) {
|
||||
MD5Update(md5, static_cast<unsigned char*>(fileBuffer), fileBytes);
|
||||
}
|
||||
|
@ -254,7 +254,7 @@ CSimpleFontString* LoadXML_String(XMLNode* node, CSimpleFrame* frame, CStatus* s
|
||||
if (m) {
|
||||
fontString = new (m) CSimpleFontString(frame, 2, 1);
|
||||
} else {
|
||||
fontString = NULL;
|
||||
fontString = nullptr;
|
||||
}
|
||||
|
||||
fontString->PreLoadXML(node, status);
|
||||
@ -275,7 +275,7 @@ CSimpleTexture* LoadXML_Texture(XMLNode* node, CSimpleFrame* frame, CStatus* sta
|
||||
if (m) {
|
||||
texture = new (m) CSimpleTexture(frame, 2, 1);
|
||||
} else {
|
||||
texture = NULL;
|
||||
texture = nullptr;
|
||||
}
|
||||
|
||||
texture->PreLoadXML(node, status);
|
||||
|
@ -36,7 +36,7 @@ luaL_Reg FrameScriptInternal::extra_funcs[31] = {
|
||||
{ "debugstack", &debugstack },
|
||||
{ "debuglocals", &debuglocals },
|
||||
{ "scrub", &scrub },
|
||||
{ NULL, NULL }
|
||||
{ nullptr, nullptr }
|
||||
};
|
||||
|
||||
int32_t sub_8168D0(lua_State* L) {
|
||||
|
Loading…
Reference in New Issue
Block a user