- fixed many compilation errors with GCC and Clang

This commit is contained in:
alexey.lysiuk 2019-01-07 10:14:52 +02:00 committed by Christoph Oelckers
parent 4fdcc47edc
commit 11958b713e
25 changed files with 110 additions and 110 deletions

View file

@ -150,7 +150,7 @@ void VerifyTargetChain(AActor *self, bool preciseMissileCheck)
{
// if any of the actors from self to (inclusive) origin match the next actor,
// self has reached/created a loop
self->target = NULL;
self->target = nullptr;
return;
}
if (compare == origin) break; // when "compare" = origin, we know that the next actor is, and should be "next"
@ -176,7 +176,7 @@ void VerifyMasterChain(AActor *self)
{
if (compare == next)
{
self->master = NULL;
self->master = nullptr;
return;
}
if (compare == origin) break;

View file

@ -351,7 +351,7 @@ AActor *DBot::Choose_Mate ()
if (mate)
{
if (mate->health <= 0)
mate = NULL;
mate = nullptr;
else
last_mate = mate;
}
@ -361,7 +361,7 @@ AActor *DBot::Choose_Mate ()
//Check old_mates status.
if (last_mate)
if (last_mate->health <= 0)
last_mate = NULL;
last_mate = nullptr;
target = NULL;
closest_dist = FLT_MAX;

View file

@ -174,12 +174,12 @@ void FCajunMaster::Main ()
void FCajunMaster::Init ()
{
botnum = 0;
firstthing = NULL;
firstthing = nullptr;
spawn_tries = 0;
freeze = false;
observer = false;
body1 = NULL;
body2 = NULL;
body1 = nullptr;
body2 = nullptr;
if (ctf && teamplay == false)
teamplay = true; //Need teamplay for ctf. (which is not done yet)

View file

@ -121,7 +121,7 @@ void DBot::ThinkForMove (ticcmd_t *cmd)
(!missile->Vel.X || !missile->Vel.Y || !Check_LOS(missile, SHOOTFOV*3/2)))
{
sleft = !sleft;
missile = NULL; //Probably ended its travel.
missile = nullptr; //Probably ended its travel.
}
#if 0 // this has always been broken and without any reference it cannot be fixed.
@ -183,7 +183,7 @@ void DBot::ThinkForMove (ticcmd_t *cmd)
}
}
dest = NULL; //To let bot turn right
dest = nullptr; //To let bot turn right
if (GetBotInfo(player->ReadyWeapon).MoveCombatDist == 0)
player->mo->flags &= ~MF_DROPOFF; //Don't jump off any ledges when fighting.
@ -237,7 +237,7 @@ void DBot::ThinkForMove (ticcmd_t *cmd)
{
if (mate == dest && pr_botmove.Random() < 32)
{ // [RH] If the mate is the dest, pick a new dest sometimes
dest = NULL;
dest = nullptr;
}
goto roam;
}
@ -264,7 +264,7 @@ void DBot::ThinkForMove (ticcmd_t *cmd)
if (dest && !(dest->flags&MF_SPECIAL) && dest->health < 0)
{ //Roaming after something dead.
dest = NULL;
dest = nullptr;
}
if (dest == NULL)
@ -333,7 +333,7 @@ void DBot::ThinkForMove (ticcmd_t *cmd)
if (!t_roam && dest)
{
prev = dest;
dest = NULL;
dest = nullptr;
}
if (t_fight<(AFTERTICS/2))
@ -438,5 +438,5 @@ void DBot::Set_enemy ()
}
//Verify that that enemy is really something alive that bot can kill.
if (enemy && ((enemy->health < 0 || !(enemy->flags&MF_SHOOTABLE)) || player->mo->IsFriend(enemy)))
enemy = NULL;
enemy = nullptr;
}

View file

@ -180,7 +180,7 @@ public:
return *this;
}
T operator=(nullptr_t nul)
T operator=(std::nullptr_t nul)
{
o = nullptr;
return nullptr;

View file

@ -3311,7 +3311,7 @@ void FParser::SF_Resurrect()
mo->Height = mo->GetDefault()->Height;
mo->radius = mo->GetDefault()->radius;
mo->Revive();
mo->target = NULL;
mo->target = nullptr;
}
}

View file

@ -130,7 +130,7 @@ void DFsScript::ClearSections()
var->Destroy();
var = next;
}
sections[i] = NULL;
sections[i] = nullptr;
}
}

View file

@ -179,9 +179,9 @@ DFsVariable::DFsVariable(const char * _name)
{
Name=_name;
type=svt_int;
actor = NULL;
actor = nullptr;
value.i=0;
next=NULL;
next = nullptr;
}
//==========================================================================

View file

@ -1698,7 +1698,7 @@ void G_DoPlayerPop(int playernum)
players[playernum].mo->Destroy();
}
players[playernum].mo = NULL;
players[playernum].camera = NULL;
players[playernum].camera = nullptr;
}
players[playernum].DestroyPSprites();
@ -2762,7 +2762,7 @@ bool G_CheckDemoStatus (void)
for (int i = 1; i < MAXPLAYERS; i++)
playeringame[i] = 0;
consoleplayer = 0;
players[0].camera = NULL;
players[0].camera = nullptr;
if (StatusBar != NULL)
{
StatusBar->AttachToPlayer (&players[0]);

View file

@ -1289,7 +1289,7 @@ void G_StartTravel ()
{
AActor *pawn = players[i].mo;
AActor *inv;
players[i].camera = NULL;
players[i].camera = nullptr;
// Only living players travel. Dead ones get a new body on the new level.
if (players[i].health > 0)
@ -1391,8 +1391,8 @@ int G_FinishTravel ()
{
P_FindFloorCeiling(pawn);
}
pawn->target = NULL;
pawn->lastenemy = NULL;
pawn->target = nullptr;
pawn->lastenemy = nullptr;
pawn->player->mo = pawn;
pawn->player->camera = pawn;
pawn->player->viewheight = pawn->player->DefaultViewHeight();

View file

@ -436,7 +436,7 @@ void DBaseStatusBar::OnDestroy ()
msg->Destroy();
msg = next;
}
Messages[i] = NULL;
Messages[i] = nullptr;
}
if (AltHud) AltHud->Destroy();
Super::OnDestroy();
@ -708,7 +708,7 @@ DHUDMessageBase *DBaseStatusBar::DetachMessage (DHUDMessageBase *msg)
if (probe != NULL)
{
*prev = probe->Next;
probe->Next = NULL;
probe->Next = nullptr;
return probe;
}
}
@ -730,7 +730,7 @@ DHUDMessageBase *DBaseStatusBar::DetachMessage (uint32_t id)
if (probe != NULL)
{
*prev = probe->Next;
probe->Next = NULL;
probe->Next = nullptr;
return probe;
}
}
@ -749,7 +749,7 @@ void DBaseStatusBar::DetachAllMessages ()
{
DHUDMessageBase *probe = Messages[i];
Messages[i] = NULL;
Messages[i] = nullptr;
while (probe != NULL)
{
DHUDMessageBase *next = probe->Next;

View file

@ -681,7 +681,7 @@ DIntermissionController::DIntermissionController(FIntermissionDescriptor *Desc,
mIndex = 0;
mAdvance = false;
mSentAdvance = false;
mScreen = NULL;
mScreen = nullptr;
mFirst = true;
mGameState = state;
}

View file

@ -3915,15 +3915,15 @@ int DoSetMaster (AActor *self, AActor *master)
self->flags = (self->flags & ~MF_FRIENDLY) | (master->flags & MF_FRIENDLY);
level.total_monsters += self->CountsAsKill();
// Don't attack your new master
if (self->target == self->master) self->target = NULL;
if (self->lastenemy == self->master) self->lastenemy = NULL;
if (self->LastHeard == self->master) self->LastHeard = NULL;
if (self->target == self->master) self->target = nullptr;
if (self->lastenemy == self->master) self->lastenemy = nullptr;
if (self->LastHeard == self->master) self->LastHeard = nullptr;
return 1;
}
else if (master->player)
{
// [KS] Be friendly to this player
self->master = NULL;
self->master = nullptr;
level.total_monsters -= self->CountsAsKill();
self->flags|=MF_FRIENDLY;
self->SetFriendPlayer(master->player);
@ -3938,15 +3938,15 @@ int DoSetMaster (AActor *self, AActor *master)
}
}
// And stop attacking him if necessary.
if (self->target == master) self->target = NULL;
if (self->lastenemy == master) self->lastenemy = NULL;
if (self->LastHeard == master) self->LastHeard = NULL;
if (self->target == master) self->target = nullptr;
if (self->lastenemy == master) self->lastenemy = nullptr;
if (self->LastHeard == master) self->LastHeard = nullptr;
return 1;
}
}
else
{
self->master = NULL;
self->master = nullptr;
self->FriendPlayer = 0;
// Go back to whatever friendliness we usually have...
defs = self->GetDefault();
@ -3954,9 +3954,9 @@ int DoSetMaster (AActor *self, AActor *master)
self->flags = (self->flags & ~MF_FRIENDLY) | (defs->flags & MF_FRIENDLY);
level.total_monsters += self->CountsAsKill();
// ...And re-side with our friends.
if (self->target && !self->IsHostile (self->target)) self->target = NULL;
if (self->lastenemy && !self->IsHostile (self->lastenemy)) self->lastenemy = NULL;
if (self->LastHeard && !self->IsHostile (self->LastHeard)) self->LastHeard = NULL;
if (self->target && !self->IsHostile (self->target)) self->target = nullptr;
if (self->lastenemy && !self->IsHostile (self->lastenemy)) self->lastenemy = nullptr;
if (self->LastHeard && !self->IsHostile (self->LastHeard)) self->LastHeard = nullptr;
return 1;
}
}

View file

@ -570,7 +570,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RearrangePointers)
if (!(PTROP_UNSAFETARGET & flags)) VerifyTargetChain(self);
break;
case AAPTR_NULL:
self->target = NULL;
self->target = nullptr;
// THIS IS NOT "A_ClearTarget", so no other targeting info is removed
break;
}
@ -587,7 +587,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RearrangePointers)
if (!(PTROP_UNSAFEMASTER & flags)) VerifyMasterChain(self);
break;
case AAPTR_NULL:
self->master = NULL;
self->master = nullptr;
break;
}
@ -600,7 +600,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RearrangePointers)
self->tracer = getmaster;
break; // no verification deemed necessary; the engine never follows a tracer chain(?)
case AAPTR_NULL:
self->tracer = NULL;
self->tracer = nullptr;
break;
}
return 0;
@ -771,7 +771,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SeekerMissile)
{
if (flags & SMF_LOOK)
{ // This monster is no longer seekable, so let us look for another one next time.
self->tracer = NULL;
self->tracer = nullptr;
}
}
return 0;
@ -1981,17 +1981,17 @@ DEFINE_ACTION_FUNCTION(AActor, A_Respawn)
// ...Actually it's better off an option, so you have better control over monster behavior.
if (!(flags & RSF_KEEPTARGET))
{
self->target = NULL;
self->LastHeard = NULL;
self->lastenemy = NULL;
self->target = nullptr;
self->LastHeard = nullptr;
self->lastenemy = nullptr;
}
else
{
// Don't attack yourself (Re: "Marine targets itself after suicide")
if (self->target == self)
self->target = NULL;
self->target = nullptr;
if (self->lastenemy == self)
self->lastenemy = NULL;
self->lastenemy = nullptr;
}
self->flags = (defs->flags & ~MF_FRIENDLY) | (self->flags & MF_FRIENDLY);

View file

@ -1074,8 +1074,8 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply
{
npc->flags5 &= ~MF5_INCONVERSATION;
player->ConversationFaceTalker = false;
player->ConversationNPC = NULL;
player->ConversationPC = NULL;
player->ConversationNPC = nullptr;
player->ConversationPC = nullptr;
player->ConversationNPCAngle = 0.;
}
@ -1121,8 +1121,8 @@ void P_ConversationCommand (int netcode, int pnum, uint8_t **stream)
if (netcode == DEM_CONVNULL)
{
player->ConversationFaceTalker = false;
player->ConversationNPC = NULL;
player->ConversationPC = NULL;
player->ConversationNPC = nullptr;
player->ConversationPC = nullptr;
player->ConversationNPCAngle = 0.;
}
}

View file

@ -147,7 +147,7 @@ void DDoor::Tick ()
{
case doorRaise:
case doorClose:
m_Sector->ceilingdata = NULL; //jff 2/22/98
m_Sector->ceilingdata = nullptr; //jff 2/22/98
Destroy (); // unlink and free
break;
@ -198,7 +198,7 @@ void DDoor::Tick ()
case doorCloseWaitOpen:
case doorOpen:
m_Sector->ceilingdata = NULL; //jff 2/22/98
m_Sector->ceilingdata = nullptr; //jff 2/22/98
Destroy (); // unlink and free
break;
@ -593,7 +593,7 @@ void DAnimatedDoor::Tick ()
switch (m_Status)
{
case Dead:
m_Sector->ceilingdata = NULL;
m_Sector->ceilingdata = nullptr;
Destroy ();
break;
@ -608,7 +608,7 @@ void DAnimatedDoor::Tick ()
if (m_Delay == 0)
{
m_Sector->ceilingdata = NULL;
m_Sector->ceilingdata = nullptr;
Destroy ();
break;
}
@ -647,7 +647,7 @@ void DAnimatedDoor::Tick ()
{
// IF DOOR IS DONE CLOSING...
m_Sector->MoveCeiling (2048., m_BotDist, -1);
m_Sector->ceilingdata = NULL;
m_Sector->ceilingdata = nullptr;
Destroy ();
// Unset blocking flags on lines that didn't start with them. Since the
// ceiling is down now, we shouldn't need this flag anymore to keep things

View file

@ -1336,7 +1336,7 @@ int P_LookForTID (AActor *actor, INTBOOL allaround, FLookExParams *params)
if (actor->LastLookActor != NULL &&
actor->LastLookActor->tid != actor->TIDtoHate)
{
actor->LastLookActor = NULL;
actor->LastLookActor = nullptr;
}
FActorIterator iterator (actor->TIDtoHate, actor->LastLookActor);
@ -1401,12 +1401,12 @@ int P_LookForTID (AActor *actor, INTBOOL allaround, FLookExParams *params)
if (!actor->IsFriend(actor->lastenemy))
{
actor->target = actor->lastenemy;
actor->lastenemy = NULL;
actor->lastenemy = nullptr;
return true;
}
else
{
actor->lastenemy = NULL;
actor->lastenemy = nullptr;
}
}
}
@ -1540,12 +1540,12 @@ int P_LookForEnemies (AActor *actor, INTBOOL allaround, FLookExParams *params)
if (!actor->IsFriend(actor->lastenemy))
{
actor->target = actor->lastenemy;
actor->lastenemy = NULL;
actor->lastenemy = nullptr;
return true;
}
else
{
actor->lastenemy = NULL;
actor->lastenemy = nullptr;
}
}
}
@ -1674,12 +1674,12 @@ int P_LookForPlayers (AActor *actor, INTBOOL allaround, FLookExParams *params)
if (!actor->IsFriend(actor->lastenemy))
{
actor->target = actor->lastenemy;
actor->lastenemy = NULL;
actor->lastenemy = nullptr;
return true;
}
else
{
actor->lastenemy = NULL;
actor->lastenemy = nullptr;
}
}
}
@ -1839,7 +1839,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Look)
if (self->target == self->goal)
{
if (self->reactiontime > level.maptime)
self->target = NULL;
self->target = nullptr;
}
else if (self->SeeSound)
{
@ -1926,7 +1926,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LookEx)
if (maxheardist && dist > maxheardist)
{
targ = NULL;
self->LastHeard = NULL;
self->LastHeard = nullptr;
}
}
}
@ -1985,7 +1985,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LookEx)
// [KS] The target can become ourselves in rare circumstances (like
// if we committed suicide), so if that's the case, just ignore it.
if (self->target == self) self->target = NULL;
if (self->target == self) self->target = nullptr;
if (self->target != NULL)
{
@ -2021,7 +2021,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LookEx)
if (self->target == self->goal)
{
if (self->reactiontime > level.maptime)
self->target = NULL;
self->target = nullptr;
}
else if (self->SeeSound && !(flags & LOF_NOSEESOUND))
{
@ -2063,7 +2063,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LookEx)
DEFINE_ACTION_FUNCTION(AActor, A_ClearLastHeard)
{
PARAM_SELF_PROLOGUE(AActor);
self->LastHeard = NULL;
self->LastHeard = nullptr;
return 0;
}
@ -2225,7 +2225,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi
actor->target->renderflags & RF_INVISIBLE &&
actor->target != actor->goal)
{
actor->target = NULL;
actor->target = nullptr;
}
// modify target threshold
@ -2274,7 +2274,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi
// [RH] If the target is dead or a friend (and not a goal), stop chasing it.
if (actor->target && actor->target != actor->goal && (actor->target->health <= 0 || actor->IsFriend(actor->target)))
actor->target = NULL;
actor->target = nullptr;
// [RH] Friendly monsters will consider chasing whoever hurts a player if they
// don't already have a target.
@ -2398,7 +2398,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi
actor->reactiontime = actor->GetDefault()->reactiontime;
actor->Angles.Yaw = lastgoalang; // Look in direction of last goal
}
if (actor->target == actor->goal) actor->target = NULL;
if (actor->target == actor->goal) actor->target = nullptr;
actor->flags |= MF_JUSTATTACKED;
if (newgoal != NULL && delay != 0)
{
@ -2692,8 +2692,8 @@ bool P_CheckForResurrection(AActor *self, bool usevilestates)
{
// If this is a friendly Arch-Vile (which is turning the resurrected monster into its friend)
// and the Arch-Vile is currently targetting the resurrected monster the target must be cleared.
if (self->lastenemy == temp) self->lastenemy = NULL;
if (self->lastenemy == corpsehit) self->lastenemy = NULL;
if (self->lastenemy == temp) self->lastenemy = nullptr;
if (self->lastenemy == corpsehit) self->lastenemy = nullptr;
if (temp == self->target) temp = NULL;
}
self->target = temp;

View file

@ -181,7 +181,7 @@ void DFloor::Tick ()
}
}
m_Sector->floordata = NULL; //jff 2/22/98
m_Sector->floordata = nullptr; //jff 2/22/98
StopInterpolation();
//jff 2/26/98 implement stair retrigger lockout while still building
@ -561,7 +561,7 @@ bool EV_FloorCrushStop (int tag, line_t *line)
{
SN_StopSequence (sec, CHAN_FLOOR);
sec->floordata->Destroy ();
sec->floordata = NULL;
sec->floordata = nullptr;
}
}
return true;
@ -900,12 +900,12 @@ void DElevator::OnDestroy()
if (m_Interp_Ceiling != NULL)
{
m_Interp_Ceiling->DelRef();
m_Interp_Ceiling = NULL;
m_Interp_Ceiling = nullptr;
}
if (m_Interp_Floor != NULL)
{
m_Interp_Floor->DelRef();
m_Interp_Floor = NULL;
m_Interp_Floor = nullptr;
}
Super::OnDestroy();
}
@ -964,8 +964,8 @@ void DElevator::Tick ()
// make floor stop sound
SN_StopSequence (m_Sector, CHAN_FLOOR);
m_Sector->floordata = NULL; //jff 2/22/98
m_Sector->ceilingdata = NULL; //jff 2/22/98
m_Sector->floordata = nullptr; //jff 2/22/98
m_Sector->ceilingdata = nullptr; //jff 2/22/98
Destroy (); // remove elevator from actives
}
}
@ -1225,11 +1225,11 @@ void DWaggleBase::DoWaggle (bool ceiling)
P_ChangeSector (m_Sector, true, dist, ceiling, false);
if (ceiling)
{
m_Sector->ceilingdata = NULL;
m_Sector->ceilingdata = nullptr;
}
else
{
m_Sector->floordata = NULL;
m_Sector->floordata = nullptr;
}
Destroy ();
return;

View file

@ -580,8 +580,8 @@ void AActor::Die (AActor *source, AActor *inflictor, int dmgflags, FName MeansOf
if (players[i].Bot != NULL && this == players[i].Bot->enemy)
{
if (players[i].Bot->dest == players[i].Bot->enemy)
players[i].Bot->dest = NULL;
players[i].Bot->enemy = NULL;
players[i].Bot->dest = nullptr;
players[i].Bot->enemy = nullptr;
}
}

View file

@ -1620,7 +1620,7 @@ FUNC(LS_Thing_Hate)
if (arg2 != 0)
{
hater->TIDtoHate = arg1;
hater->LastLookActor = NULL;
hater->LastLookActor = nullptr;
// If the TID to hate is 0, then don't forget the target and
// lastenemy fields.
@ -1628,11 +1628,11 @@ FUNC(LS_Thing_Hate)
{
if (hater->target != NULL && hater->target->tid != arg1)
{
hater->target = NULL;
hater->target = nullptr;
}
if (hater->lastenemy != NULL && hater->lastenemy->tid != arg1)
{
hater->lastenemy = NULL;
hater->lastenemy = nullptr;
}
}
}
@ -1826,7 +1826,7 @@ FUNC(LS_Thing_SetGoal)
{ // Targeting a goal already? -> don't target it anymore.
// A_Look will set it to the goal, presuming no real targets
// come into view by then.
self->target = NULL;
self->target = nullptr;
}
self->goal = goal;
if (arg3 == 0)

View file

@ -2336,7 +2336,7 @@ bool P_TryMove(AActor *thing, const DVector2 &pos,
&& bglobal.IsDangerous(tm.sector))
{
thing->player->Bot->prev = thing->player->Bot->dest;
thing->player->Bot->dest = NULL;
thing->player->Bot->dest = nullptr;
thing->Vel.X = thing->Vel.Y = 0;
thing->SetZ(oldz);
thing->flags6 &= ~MF6_INTRYMOVE;

View file

@ -1713,7 +1713,7 @@ bool P_SeekerMissile (AActor *actor, double thresh, double turnMax, bool precise
}
if (!(target->flags & MF_SHOOTABLE))
{ // Target died
actor->tracer = NULL;
actor->tracer = nullptr;
return false;
}
if (speed == 0)
@ -5057,14 +5057,14 @@ AActor *P_SpawnPlayer (FPlayerStart *mthing, int playernum, int flags)
p->fixedlightlevel = -1;
p->viewheight = p->DefaultViewHeight();
p->inconsistant = 0;
p->attacker = NULL;
p->attacker = nullptr;
p->spreecount = 0;
p->multicount = 0;
p->lastkilltime = 0;
p->BlendR = p->BlendG = p->BlendB = p->BlendA = 0.f;
p->Uncrouch();
p->MinPitch = p->MaxPitch = 0.; // will be filled in by PostBeginPlay()/netcode
p->MUSINFOactor = NULL;
p->MUSINFOactor = nullptr;
p->MUSINFOtics = -1;
p->Vel.Zero(); // killough 10/98: initialize bobbing to 0.
@ -5160,7 +5160,7 @@ AActor *P_SpawnPlayer (FPlayerStart *mthing, int playernum, int flags)
TThinkerIterator<AActor> it;
while ((th = it.Next()))
{
if (th->LastHeard == oldactor) th->LastHeard = NULL;
if (th->LastHeard == oldactor) th->LastHeard = nullptr;
}
for(auto &sec : level.sectors)
{
@ -7137,8 +7137,8 @@ void AActor::Revive()
if (SpawnFlags & MTF_FRIENDLY) flags |= MF_FRIENDLY;
DamageType = info->DamageType;
health = SpawnHealth();
target = NULL;
lastenemy = NULL;
target = nullptr;
lastenemy = nullptr;
// [RH] If it's a monster, it gets to count as another kill
if (CountsAsKill())

View file

@ -977,7 +977,7 @@ void P_SetupPortals()
if (s.mType == PORTS_STACKEDSECTORTHING && s.mSkybox)
{
s.mDisplacement = s.mSkybox->Pos() - s.mSkybox->target->Pos();
s.mSkybox = NULL;
s.mSkybox = nullptr;
}
}
}

View file

@ -222,7 +222,7 @@ void FInterpolator::AddInterpolation(DInterpolation *interp)
{
interp->Next = Head;
if (Head != NULL) Head->Prev = interp;
interp->Prev = NULL;
interp->Prev = nullptr;
Head = interp;
count++;
}
@ -238,15 +238,15 @@ void FInterpolator::RemoveInterpolation(DInterpolation *interp)
if (Head == interp)
{
Head = interp->Next;
if (Head != NULL) Head->Prev = NULL;
if (Head != nullptr) Head->Prev = nullptr;
}
else
{
if (interp->Prev != NULL) interp->Prev->Next = interp->Next;
if (interp->Next != NULL) interp->Next->Prev = interp->Prev;
}
interp->Next = NULL;
interp->Prev = NULL;
interp->Next = nullptr;
interp->Prev = nullptr;
count--;
}
@ -302,11 +302,11 @@ void FInterpolator::RestoreInterpolations()
void FInterpolator::ClearInterpolations()
{
DInterpolation *probe = Head;
Head = NULL;
while (probe != NULL)
Head = nullptr;
while (probe != nullptr)
{
DInterpolation *next = probe->Next;
probe->Next = probe->Prev = NULL;
probe->Next = probe->Prev = nullptr;
probe->Destroy();
probe = next;
}
@ -327,8 +327,8 @@ void FInterpolator::ClearInterpolations()
DInterpolation::DInterpolation()
{
Next = NULL;
Prev = NULL;
Next = nullptr;
Prev = nullptr;
refcount = 0;
}

View file

@ -307,7 +307,7 @@ IMPLEMENT_POINTERS_END
DSeqNode::DSeqNode ()
: m_SequenceChoices(0)
{
m_Next = m_Prev = m_ChildSeqNode = m_ParentSeqNode = NULL;
m_Next = m_Prev = m_ChildSeqNode = m_ParentSeqNode = nullptr;
}
void DSeqNode::Serialize(FSerializer &arc)
@ -395,8 +395,8 @@ void DSeqNode::OnDestroy()
if (m_ParentSeqNode != NULL && m_ParentSeqNode->m_ChildSeqNode == this)
{
m_ParentSeqNode->m_SequencePtr++;
m_ParentSeqNode->m_ChildSeqNode = NULL;
m_ParentSeqNode = NULL;
m_ParentSeqNode->m_ChildSeqNode = nullptr;
m_ParentSeqNode = nullptr;
}
if (SequenceListHead == this)
{
@ -821,7 +821,7 @@ DSeqNode::DSeqNode (int sequence, int modenum)
m_Prev = NULL;
}
GC::WriteBarrier(this);
m_ParentSeqNode = m_ChildSeqNode = NULL;
m_ParentSeqNode = m_ChildSeqNode = nullptr;
}
void DSeqNode::ActivateSequence (int sequence)