mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
refactor(Core): NULL -> nullptr (#3275)
* NULL to nullptr * NULL to nullptr * NULL to nullptr * NULL to nullptr * NULL to nullptr Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com> Co-authored-by: Stefano Borzì <stefanoborzi32@gmail.com>
This commit is contained in:
@@ -104,7 +104,7 @@ void MotionMaster::UpdateMotion(uint32 diff)
|
||||
}
|
||||
|
||||
delete _expList;
|
||||
_expList = NULL;
|
||||
_expList = nullptr;
|
||||
|
||||
if (empty())
|
||||
Initialize();
|
||||
@@ -192,7 +192,7 @@ void MotionMaster::DirectExpireSlot(MovementSlot slot, bool reset)
|
||||
MovementGenerator *curr = Impl[slot];
|
||||
|
||||
// pussywizard: clear slot AND decrease top immediately to avoid crashes when referencing null top in DirectDelete
|
||||
Impl[slot] = NULL;
|
||||
Impl[slot] = nullptr;
|
||||
while (!empty() && !top())
|
||||
--_top;
|
||||
|
||||
@@ -535,7 +535,7 @@ void MotionMaster::MoveFall(uint32 id /*=0*/, bool addFlagForNPC)
|
||||
{
|
||||
_owner->AddUnitMovementFlag(MOVEMENTFLAG_FALLING);
|
||||
_owner->m_movementInfo.SetFallTime(0);
|
||||
_owner->ToPlayer()->SetFallInformation(time(NULL), _owner->GetPositionZ());
|
||||
_owner->ToPlayer()->SetFallInformation(time(nullptr), _owner->GetPositionZ());
|
||||
}
|
||||
else if (_owner->GetTypeId() == TYPEID_UNIT && addFlagForNPC) // pussywizard
|
||||
{
|
||||
@@ -716,7 +716,7 @@ void MotionMaster::Mutate(MovementGenerator *m, MovementSlot slot)
|
||||
bool delayed = (_top == slot && (_cleanFlag & MMCF_UPDATE));
|
||||
|
||||
// pussywizard: clear slot AND decrease top immediately to avoid crashes when referencing null top in DirectDelete
|
||||
Impl[slot] = NULL;
|
||||
Impl[slot] = nullptr;
|
||||
while (!empty() && !top())
|
||||
--_top;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user