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

@@ -55,7 +55,7 @@ void TransportMgr::LoadTransportTemplates()
Field* fields = result->Fetch();
uint32 entry = fields[0].GetUInt32();
GameObjectTemplate const* goInfo = sObjectMgr->GetGameObjectTemplate(entry);
if (goInfo == NULL)
if (goInfo == nullptr)
{
sLog->outError("Transport %u has no associated GameObjectTemplate from `gameobject_template` , skipped.", entry);
continue;
@@ -354,14 +354,14 @@ MotionTransport* TransportMgr::CreateTransport(uint32 entry, uint32 guid /*= 0*/
entry = instance->GetGameObjectEntry(0, entry);
if (!entry)
return NULL;
return nullptr;
}
TransportTemplate const* tInfo = GetTransportTemplate(entry);
if (!tInfo)
{
sLog->outError("Transport %u will not be loaded, `transport_template` missing", entry);
return NULL;
return nullptr;
}
// create transport...
@@ -380,7 +380,7 @@ MotionTransport* TransportMgr::CreateTransport(uint32 entry, uint32 guid /*= 0*/
if (!trans->CreateMoTrans(guidLow, entry, mapId, x, y, z, o, 255))
{
delete trans;
return NULL;
return nullptr;
}
if (MapEntry const* mapEntry = sMapStore.LookupEntry(mapId))
@@ -389,12 +389,12 @@ MotionTransport* TransportMgr::CreateTransport(uint32 entry, uint32 guid /*= 0*/
{
sLog->outError("Transport %u (name: %s) attempted creation in instance map (id: %u) but it is not an instanced transport!", entry, trans->GetName().c_str(), mapId);
delete trans;
return NULL;
return nullptr;
}
}
// use preset map for instances (need to know which instance)
trans->SetMap(map ? map : sMapMgr->CreateMap(mapId, NULL));
trans->SetMap(map ? map : sMapMgr->CreateMap(mapId, nullptr));
if (map && map->IsDungeon())
trans->m_zoneScript = map->ToInstanceMap()->GetInstanceScript();