mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- replaced some NULLs with nullptr.
This commit is contained in:
parent
8ead5a3a6b
commit
a11eea98b5
8 changed files with 53 additions and 53 deletions
|
@ -71,14 +71,14 @@ DBot::DBot ()
|
|||
|
||||
void DBot::Clear ()
|
||||
{
|
||||
player = NULL;
|
||||
player = nullptr;
|
||||
Angle = 0.;
|
||||
dest = NULL;
|
||||
prev = NULL;
|
||||
enemy = NULL;
|
||||
missile = NULL;
|
||||
mate = NULL;
|
||||
last_mate = NULL;
|
||||
dest = nullptr;
|
||||
prev = nullptr;
|
||||
enemy = nullptr;
|
||||
missile = nullptr;
|
||||
mate = nullptr;
|
||||
last_mate = nullptr;
|
||||
memset(&skill, 0, sizeof(skill));
|
||||
t_active = 0;
|
||||
t_respawn = 0;
|
||||
|
@ -138,7 +138,7 @@ void DBot::Tick ()
|
|||
{
|
||||
Super::Tick ();
|
||||
|
||||
if (player->mo == NULL || bglobal.freeze)
|
||||
if (player->mo == nullptr || bglobal.freeze)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ CCMD (addbot)
|
|||
if (argv.argc() > 1)
|
||||
bglobal.SpawnBot (argv[1]);
|
||||
else
|
||||
bglobal.SpawnBot (NULL);
|
||||
bglobal.SpawnBot (nullptr);
|
||||
}
|
||||
|
||||
void FCajunMaster::ClearPlayer (int i, bool keepTeam)
|
||||
|
@ -184,7 +184,7 @@ void FCajunMaster::ClearPlayer (int i, bool keepTeam)
|
|||
if (players[i].mo)
|
||||
{
|
||||
players[i].mo->Destroy ();
|
||||
players[i].mo = NULL;
|
||||
players[i].mo = nullptr;
|
||||
}
|
||||
botinfo_t *bot = botinfo;
|
||||
while (bot && stricmp (players[i].userinfo.GetName(), bot->name))
|
||||
|
@ -194,10 +194,10 @@ void FCajunMaster::ClearPlayer (int i, bool keepTeam)
|
|||
bot->inuse = BOTINUSE_No;
|
||||
bot->lastteam = keepTeam ? players[i].userinfo.GetTeam() : TEAM_NONE;
|
||||
}
|
||||
if (players[i].Bot != NULL)
|
||||
if (players[i].Bot != nullptr)
|
||||
{
|
||||
players[i].Bot->Destroy ();
|
||||
players[i].Bot = NULL;
|
||||
players[i].Bot = nullptr;
|
||||
}
|
||||
players[i].~player_t();
|
||||
::new(&players[i]) player_t;
|
||||
|
@ -261,7 +261,7 @@ void InitBotStuff()
|
|||
while (sc.GetString())
|
||||
{
|
||||
PClassActor *wcls = PClass::FindActor(sc.String);
|
||||
if (wcls != NULL && wcls->IsDescendantOf(NAME_Weapon))
|
||||
if (wcls != nullptr && wcls->IsDescendantOf(NAME_Weapon))
|
||||
{
|
||||
BotInfoData bi = {};
|
||||
sc.MustGetStringName(",");
|
||||
|
@ -306,7 +306,7 @@ void InitBotStuff()
|
|||
for(unsigned i=0;i<countof(warnbotmissiles);i++)
|
||||
{
|
||||
AActor *a = GetDefaultByName (warnbotmissiles[i]);
|
||||
if (a != NULL)
|
||||
if (a != nullptr)
|
||||
{
|
||||
a->flags3|=MF3_WARNBOT;
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ void DBot::Think ()
|
|||
memset (cmd, 0, sizeof(*cmd));
|
||||
|
||||
if (enemy && enemy->health <= 0)
|
||||
enemy = NULL;
|
||||
enemy = nullptr;
|
||||
|
||||
if (player->mo->health > 0) //Still alive
|
||||
{
|
||||
|
|
|
@ -39,7 +39,7 @@ IMPLEMENT_CLASS(DSectorEffect, false, false)
|
|||
DSectorEffect::DSectorEffect ()
|
||||
: DThinker(STAT_SECTOREFFECT)
|
||||
{
|
||||
m_Sector = NULL;
|
||||
m_Sector = nullptr;
|
||||
}
|
||||
|
||||
void DSectorEffect::OnDestroy()
|
||||
|
@ -48,15 +48,15 @@ void DSectorEffect::OnDestroy()
|
|||
{
|
||||
if (m_Sector->floordata == this)
|
||||
{
|
||||
m_Sector->floordata = NULL;
|
||||
m_Sector->floordata = nullptr;
|
||||
}
|
||||
if (m_Sector->ceilingdata == this)
|
||||
{
|
||||
m_Sector->ceilingdata = NULL;
|
||||
m_Sector->ceilingdata = nullptr;
|
||||
}
|
||||
if (m_Sector->lightingdata == this)
|
||||
{
|
||||
m_Sector->lightingdata = NULL;
|
||||
m_Sector->lightingdata = nullptr;
|
||||
}
|
||||
}
|
||||
Super::OnDestroy();
|
||||
|
@ -91,7 +91,7 @@ IMPLEMENT_POINTERS_END
|
|||
DMover::DMover (sector_t *sector)
|
||||
: DSectorEffect (sector)
|
||||
{
|
||||
interpolation = NULL;
|
||||
interpolation = nullptr;
|
||||
}
|
||||
|
||||
void DMover::OnDestroy()
|
||||
|
@ -108,10 +108,10 @@ void DMover::Serialize(FSerializer &arc)
|
|||
|
||||
void DMover::StopInterpolation(bool force)
|
||||
{
|
||||
if (interpolation != NULL)
|
||||
if (interpolation != nullptr)
|
||||
{
|
||||
interpolation->DelRef(force);
|
||||
interpolation = NULL;
|
||||
interpolation = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ void DFsScript::ClearChildren()
|
|||
for(j=0;j<MAXSCRIPTS;j++) if (children[j])
|
||||
{
|
||||
children[j]->Destroy();
|
||||
children[j]=NULL;
|
||||
children[j]=nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -123,15 +123,15 @@ DFsScript::DFsScript()
|
|||
{
|
||||
int i;
|
||||
|
||||
for(i=0; i<SECTIONSLOTS; i++) sections[i] = NULL;
|
||||
for(i=0; i<VARIABLESLOTS; i++) variables[i] = NULL;
|
||||
for(i=0; i<MAXSCRIPTS; i++) children[i] = NULL;
|
||||
for(i=0; i<SECTIONSLOTS; i++) sections[i] = nullptr;
|
||||
for(i=0; i<VARIABLESLOTS; i++) variables[i] = nullptr;
|
||||
for(i=0; i<MAXSCRIPTS; i++) children[i] = nullptr;
|
||||
|
||||
data = NULL;
|
||||
data = nullptr;
|
||||
scriptnum = -1;
|
||||
len = 0;
|
||||
parent = NULL;
|
||||
trigger = NULL;
|
||||
parent = nullptr;
|
||||
trigger = nullptr;
|
||||
lastiftrue = false;
|
||||
}
|
||||
|
||||
|
@ -144,8 +144,8 @@ DFsScript::DFsScript()
|
|||
|
||||
DFsScript::~DFsScript()
|
||||
{
|
||||
if (data != NULL) delete[] data;
|
||||
data = NULL;
|
||||
if (data != nullptr) delete[] data;
|
||||
data = nullptr;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
@ -159,11 +159,11 @@ void DFsScript::OnDestroy()
|
|||
ClearVariables(true);
|
||||
ClearSections();
|
||||
ClearChildren();
|
||||
parent = NULL;
|
||||
if (data != NULL) delete [] data;
|
||||
data = NULL;
|
||||
parent = NULL;
|
||||
trigger = NULL;
|
||||
parent = nullptr;
|
||||
if (data != nullptr) delete [] data;
|
||||
data = nullptr;
|
||||
parent = nullptr;
|
||||
trigger = nullptr;
|
||||
Super::OnDestroy();
|
||||
}
|
||||
|
||||
|
@ -202,7 +202,7 @@ void DFsScript::Serialize(FSerializer &arc)
|
|||
|
||||
void DFsScript::ParseScript(char *position)
|
||||
{
|
||||
if (position == NULL)
|
||||
if (position == nullptr)
|
||||
{
|
||||
lastiftrue = false;
|
||||
position = data;
|
||||
|
@ -257,7 +257,7 @@ IMPLEMENT_POINTERS_END
|
|||
|
||||
DRunningScript::DRunningScript(AActor *trigger, DFsScript *owner, int index)
|
||||
{
|
||||
prev = next = NULL;
|
||||
prev = next = nullptr;
|
||||
script = owner;
|
||||
GC::WriteBarrier(this, script);
|
||||
save_point = index;
|
||||
|
@ -265,9 +265,9 @@ DRunningScript::DRunningScript(AActor *trigger, DFsScript *owner, int index)
|
|||
wait_data = 0;
|
||||
|
||||
this->trigger = trigger;
|
||||
if (owner == NULL)
|
||||
if (owner == nullptr)
|
||||
{
|
||||
for(int i=0; i< VARIABLESLOTS; i++) variables[i] = NULL;
|
||||
for(int i=0; i< VARIABLESLOTS; i++) variables[i] = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -320,7 +320,7 @@ void DRunningScript::OnDestroy()
|
|||
current->Destroy();
|
||||
current = next; // go to next in chain
|
||||
}
|
||||
variables[i] = NULL;
|
||||
variables[i] = nullptr;
|
||||
}
|
||||
Super::OnDestroy();
|
||||
}
|
||||
|
@ -395,16 +395,16 @@ void DFraggleThinker::OnDestroy()
|
|||
{
|
||||
DRunningScript *q = p;
|
||||
p = p->next;
|
||||
q->prev = q->next = NULL;
|
||||
q->prev = q->next = nullptr;
|
||||
q->Destroy();
|
||||
}
|
||||
RunningScripts = NULL;
|
||||
RunningScripts = nullptr;
|
||||
|
||||
GlobalScript->Destroy();
|
||||
GlobalScript = NULL;
|
||||
GlobalScript = nullptr;
|
||||
|
||||
LevelScript->Destroy();
|
||||
LevelScript = NULL;
|
||||
LevelScript = nullptr;
|
||||
|
||||
SpawnedThings.Clear();
|
||||
Super::OnDestroy();
|
||||
|
@ -508,7 +508,7 @@ void DFraggleThinker::Tick()
|
|||
{
|
||||
current->script->variables[i] = current->variables[i];
|
||||
GC::WriteBarrier(current->script, current->variables[i]);
|
||||
current->variables[i] = NULL;
|
||||
current->variables[i] = nullptr;
|
||||
}
|
||||
current->script->trigger = current->trigger; // copy trigger
|
||||
|
||||
|
|
|
@ -232,7 +232,7 @@ public:
|
|||
|
||||
DFsSection()
|
||||
{
|
||||
next = NULL;
|
||||
next = nullptr;
|
||||
}
|
||||
|
||||
void Serialize(FSerializer &ar);
|
||||
|
|
|
@ -104,7 +104,7 @@ void P_TouchSpecialThing (AActor *special, AActor *toucher)
|
|||
if (toucher->player != NULL && toucher->player->Bot != NULL && special == toucher->player->Bot->dest)
|
||||
{
|
||||
toucher->player->Bot->prev = toucher->player->Bot->dest;
|
||||
toucher->player->Bot->dest = NULL;
|
||||
toucher->player->Bot->dest = nullptr;
|
||||
}
|
||||
special->CallTouch (toucher);
|
||||
}
|
||||
|
|
|
@ -54,15 +54,15 @@ DPillar::DPillar ()
|
|||
|
||||
void DPillar::OnDestroy()
|
||||
{
|
||||
if (m_Interp_Ceiling != NULL)
|
||||
if (m_Interp_Ceiling != nullptr)
|
||||
{
|
||||
m_Interp_Ceiling->DelRef();
|
||||
m_Interp_Ceiling = NULL;
|
||||
m_Interp_Ceiling = nullptr;
|
||||
}
|
||||
if (m_Interp_Floor != NULL)
|
||||
if (m_Interp_Floor != nullptr)
|
||||
{
|
||||
m_Interp_Floor->DelRef();
|
||||
m_Interp_Floor = NULL;
|
||||
m_Interp_Floor = nullptr;
|
||||
}
|
||||
Super::OnDestroy();
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ struct FInterpolator
|
|||
public:
|
||||
FInterpolator()
|
||||
{
|
||||
Head = NULL;
|
||||
Head = nullptr;
|
||||
didInterp = false;
|
||||
count = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue