Codechange: Use null pointer literal instead of the NULL macro

This commit is contained in:
Henry Wilson
2019-04-10 22:07:06 +01:00
committed by Michael Lutz
parent 3b4f224c0b
commit 7c8e7c6b6e
463 changed files with 5674 additions and 5674 deletions

View File

@@ -23,7 +23,7 @@ struct ScriptEventData {
/* static */ void ScriptEventController::CreateEventPointer()
{
assert(ScriptObject::GetEventPointer() == NULL);
assert(ScriptObject::GetEventPointer() == nullptr);
ScriptObject::GetEventPointer() = new ScriptEventData();
}
@@ -45,7 +45,7 @@ struct ScriptEventData {
/* static */ bool ScriptEventController::IsEventWaiting()
{
if (ScriptObject::GetEventPointer() == NULL) ScriptEventController::CreateEventPointer();
if (ScriptObject::GetEventPointer() == nullptr) ScriptEventController::CreateEventPointer();
ScriptEventData *data = (ScriptEventData *)ScriptObject::GetEventPointer();
return !data->stack.empty();
@@ -53,10 +53,10 @@ struct ScriptEventData {
/* static */ ScriptEvent *ScriptEventController::GetNextEvent()
{
if (ScriptObject::GetEventPointer() == NULL) ScriptEventController::CreateEventPointer();
if (ScriptObject::GetEventPointer() == nullptr) ScriptEventController::CreateEventPointer();
ScriptEventData *data = (ScriptEventData *)ScriptObject::GetEventPointer();
if (data->stack.empty()) return NULL;
if (data->stack.empty()) return nullptr;
ScriptEvent *e = data->stack.front();
data->stack.pop();
@@ -65,7 +65,7 @@ struct ScriptEventData {
/* static */ void ScriptEventController::InsertEvent(ScriptEvent *event)
{
if (ScriptObject::GetEventPointer() == NULL) ScriptEventController::CreateEventPointer();
if (ScriptObject::GetEventPointer() == nullptr) ScriptEventController::CreateEventPointer();
ScriptEventData *data = (ScriptEventData *)ScriptObject::GetEventPointer();
event->AddRef();