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:
Kitzunu
2020-08-31 11:55:09 +02:00
committed by GitHub
parent 38903b5dfb
commit 1f89282b22
325 changed files with 2348 additions and 2348 deletions

View File

@@ -43,8 +43,8 @@ BattlegroundIC::BattlegroundIC()
siegeEngineWorkshopTimer = WORKSHOP_UPDATE_TIME;
gunshipHorde = NULL;
gunshipAlliance = NULL;
gunshipHorde = nullptr;
gunshipAlliance = nullptr;
respawnMap.clear();
}
@@ -127,7 +127,7 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff)
{
// Check if creature respawn time is properly saved
RespawnMap::iterator itr = respawnMap.find(catapult->GetGUIDLow());
if (itr == respawnMap.end() || time(NULL) < itr->second)
if (itr == respawnMap.end() || time(nullptr) < itr->second)
continue;
catapult->Relocate(BG_IC_DocksVehiclesCatapults[j].GetPositionX(), BG_IC_DocksVehiclesCatapults[j].GetPositionY(), BG_IC_DocksVehiclesCatapults[j].GetPositionZ(), BG_IC_DocksVehiclesCatapults[j].GetOrientation());
@@ -145,7 +145,7 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff)
{
// Check if creature respawn time is properly saved
RespawnMap::iterator itr = respawnMap.find(glaiveThrower->GetGUIDLow());
if (itr == respawnMap.end() || time(NULL) < itr->second)
if (itr == respawnMap.end() || time(nullptr) < itr->second)
continue;
glaiveThrower->Relocate(BG_IC_DocksVehiclesGlaives[j].GetPositionX(), BG_IC_DocksVehiclesGlaives[j].GetPositionY(), BG_IC_DocksVehiclesGlaives[j].GetPositionZ(), BG_IC_DocksVehiclesGlaives[j].GetOrientation());
@@ -174,7 +174,7 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff)
{
// Check if creature respawn time is properly saved
RespawnMap::iterator itr = respawnMap.find(siege->GetGUIDLow());
if (itr == respawnMap.end() || time(NULL) < itr->second)
if (itr == respawnMap.end() || time(nullptr) < itr->second)
continue;
siege->Relocate(BG_IC_WorkshopVehicles[4].GetPositionX(), BG_IC_WorkshopVehicles[4].GetPositionY(), BG_IC_WorkshopVehicles[4].GetPositionZ(), BG_IC_WorkshopVehicles[4].GetOrientation());
@@ -191,7 +191,7 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff)
{
// Check if creature respawn time is properly saved
RespawnMap::iterator itr = respawnMap.find(demolisher->GetGUIDLow());
if (itr == respawnMap.end() || time(NULL) < itr->second)
if (itr == respawnMap.end() || time(nullptr) < itr->second)
continue;
demolisher->Relocate(BG_IC_WorkshopVehicles[u].GetPositionX(), BG_IC_WorkshopVehicles[u].GetPositionY(), BG_IC_WorkshopVehicles[u].GetPositionZ(), BG_IC_WorkshopVehicles[u].GetOrientation());
@@ -519,7 +519,7 @@ void BattlegroundIC::HandleKillUnit(Creature* unit, Player* killer)
// Xinef: Add to respawn list
if (entry == NPC_DEMOLISHER || entry == NPC_SIEGE_ENGINE_H || entry == NPC_SIEGE_ENGINE_A ||
entry == NPC_GLAIVE_THROWER_A || entry == NPC_GLAIVE_THROWER_H || entry == NPC_CATAPULT)
respawnMap[unit->GetGUIDLow()] = time(NULL) + VEHICLE_RESPAWN_TIME;
respawnMap[unit->GetGUIDLow()] = time(nullptr) + VEHICLE_RESPAWN_TIME;
}
}
@@ -866,7 +866,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
if (!siegeVehicle->IsVehicleInUse())
Unit::Kill(siegeEngine, siegeEngine);
respawnMap[siegeEngine->GetGUIDLow()] = time(NULL) + VEHICLE_RESPAWN_TIME;
respawnMap[siegeEngine->GetGUIDLow()] = time(nullptr) + VEHICLE_RESPAWN_TIME;
}
}
@@ -958,7 +958,7 @@ GraveyardStruct const* BattlegroundIC::GetClosestGraveyard(Player* player)
if (nodePoint[i].faction == player->GetTeamId() && !nodePoint[i].needChange) // xinef: controlled by faction and not contested!
nodes.push_back(i);
GraveyardStruct const* good_entry = NULL;
GraveyardStruct const* good_entry = nullptr;
// If so, select the closest node to place ghost on
if (!nodes.empty())
{