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:
@@ -732,8 +732,8 @@ class ObjectMgr
|
||||
CreatureTemplateContainer const* GetCreatureTemplates() const { return &_creatureTemplateStore; }
|
||||
CreatureModelInfo const* GetCreatureModelInfo(uint32 modelId);
|
||||
CreatureModelInfo const* GetCreatureModelRandomGender(uint32* displayID);
|
||||
static uint32 ChooseDisplayId(CreatureTemplate const* cinfo, CreatureData const* data = NULL);
|
||||
static void ChooseCreatureFlags(CreatureTemplate const* cinfo, uint32& npcflag, uint32& unit_flags, uint32& dynamicflags, CreatureData const* data = NULL);
|
||||
static uint32 ChooseDisplayId(CreatureTemplate const* cinfo, CreatureData const* data = nullptr);
|
||||
static void ChooseCreatureFlags(CreatureTemplate const* cinfo, uint32& npcflag, uint32& unit_flags, uint32& dynamicflags, CreatureData const* data = nullptr);
|
||||
EquipmentInfo const* GetEquipmentInfo(uint32 entry, int8& id);
|
||||
CreatureAddon const* GetCreatureAddon(uint32 lowguid);
|
||||
GameObjectAddon const* GetGameObjectAddon(uint32 lowguid);
|
||||
@@ -748,7 +748,7 @@ class ObjectMgr
|
||||
ItemSetNameContainer::iterator itr = _itemSetNameStore.find(itemId);
|
||||
if (itr != _itemSetNameStore.end())
|
||||
return &itr->second;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
InstanceTemplate const* GetInstanceTemplate(uint32 mapId);
|
||||
@@ -758,7 +758,7 @@ class ObjectMgr
|
||||
PlayerClassInfo const* GetPlayerClassInfo(uint32 class_) const
|
||||
{
|
||||
if (class_ >= MAX_CLASSES)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
return _playerClassInfo[class_];
|
||||
}
|
||||
void GetPlayerClassLevelInfo(uint32 class_, uint8 level, PlayerClassLevelInfo* info) const;
|
||||
@@ -782,7 +782,7 @@ class ObjectMgr
|
||||
GameObjectQuestItemMap::const_iterator itr = _gameObjectQuestItemStore.find(id);
|
||||
if (itr != _gameObjectQuestItemStore.end())
|
||||
return &itr->second;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
GameObjectQuestItemMap const* GetGameObjectQuestItemMap() const { return &_gameObjectQuestItemStore; }
|
||||
|
||||
@@ -791,13 +791,13 @@ class ObjectMgr
|
||||
CreatureQuestItemMap::const_iterator itr = _creatureQuestItemStore.find(id);
|
||||
if (itr != _creatureQuestItemStore.end())
|
||||
return &itr->second;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
CreatureQuestItemMap const* GetCreatureQuestItemMap() const { return &_creatureQuestItemStore; }
|
||||
|
||||
Quest const* GetQuestTemplate(uint32 quest_id) const
|
||||
{
|
||||
return quest_id < _questTemplatesFast.size() ? _questTemplatesFast[quest_id] : NULL;
|
||||
return quest_id < _questTemplatesFast.size() ? _questTemplatesFast[quest_id] : nullptr;
|
||||
}
|
||||
|
||||
QuestMap const& GetQuestTemplates() const { return _questTemplates; }
|
||||
@@ -822,7 +822,7 @@ class ObjectMgr
|
||||
AreaTriggerContainer::const_iterator itr = _areaTriggerStore.find(trigger);
|
||||
if (itr != _areaTriggerStore.end())
|
||||
return &itr->second;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
AreaTriggerTeleport const* GetAreaTriggerTeleport(uint32 trigger) const
|
||||
@@ -830,7 +830,7 @@ class ObjectMgr
|
||||
AreaTriggerTeleportContainer::const_iterator itr = _areaTriggerTeleportStore.find(trigger);
|
||||
if (itr != _areaTriggerTeleportStore.end())
|
||||
return &itr->second;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
AccessRequirement const* GetAccessRequirement(uint32 mapid, Difficulty difficulty) const
|
||||
@@ -838,7 +838,7 @@ class ObjectMgr
|
||||
AccessRequirementContainer::const_iterator itr = _accessRequirementStore.find(MAKE_PAIR32(mapid, difficulty));
|
||||
if (itr != _accessRequirementStore.end())
|
||||
return itr->second;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
AreaTriggerTeleport const* GetGoBackTrigger(uint32 Map) const;
|
||||
@@ -853,7 +853,7 @@ class ObjectMgr
|
||||
if (itr != _repRewardRateStore.end())
|
||||
return &itr->second;
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ReputationOnKillEntry const* GetReputationOnKilEntry(uint32 id) const
|
||||
@@ -861,7 +861,7 @@ class ObjectMgr
|
||||
RepOnKillContainer::const_iterator itr = _repOnKillStore.find(id);
|
||||
if (itr != _repOnKillStore.end())
|
||||
return &itr->second;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int32 GetBaseReputationOf(FactionEntry const* factionEntry, uint8 race, uint8 playerClass);
|
||||
@@ -872,7 +872,7 @@ class ObjectMgr
|
||||
if (itr != _repSpilloverTemplateStore.end())
|
||||
return &itr->second;
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
PointOfInterest const* GetPointOfInterest(uint32 id) const
|
||||
@@ -880,7 +880,7 @@ class ObjectMgr
|
||||
PointOfInterestContainer::const_iterator itr = _pointsOfInterestStore.find(id);
|
||||
if (itr != _pointsOfInterestStore.end())
|
||||
return &itr->second;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QuestPOIVector const* GetQuestPOIVector(uint32 questId)
|
||||
@@ -888,7 +888,7 @@ class ObjectMgr
|
||||
QuestPOIContainer::const_iterator itr = _questPOIStore.find(questId);
|
||||
if (itr != _questPOIStore.end())
|
||||
return &itr->second;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
VehicleAccessoryList const* GetVehicleAccessoryList(Vehicle* veh) const;
|
||||
@@ -898,7 +898,7 @@ class ObjectMgr
|
||||
std::unordered_map<uint32, DungeonEncounterList>::const_iterator itr = _dungeonEncounterStore.find(MAKE_PAIR32(mapId, difficulty));
|
||||
if (itr != _dungeonEncounterStore.end())
|
||||
return &itr->second;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void LoadQuests();
|
||||
@@ -1074,13 +1074,13 @@ class ObjectMgr
|
||||
{
|
||||
MailLevelRewardContainer::const_iterator map_itr = _mailLevelRewardStore.find(level);
|
||||
if (map_itr == _mailLevelRewardStore.end())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
for (MailLevelRewardList::const_iterator set_itr = map_itr->second.begin(); set_itr != map_itr->second.end(); ++set_itr)
|
||||
if (set_itr->raceMask & raceMask)
|
||||
return &*set_itr;
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CellObjectGuids const& GetCellObjectGuids(uint16 mapid, uint8 spawnMode, uint32 cell_id)
|
||||
@@ -1118,7 +1118,7 @@ class ObjectMgr
|
||||
if (itr != _tempSummonDataStore.end())
|
||||
return &itr->second;
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
BroadcastText const* GetBroadcastText(uint32 id) const
|
||||
@@ -1131,7 +1131,7 @@ class ObjectMgr
|
||||
CreatureData const* GetCreatureData(uint32 guid) const
|
||||
{
|
||||
CreatureDataContainer::const_iterator itr = _creatureDataStore.find(guid);
|
||||
if (itr == _creatureDataStore.end()) return NULL;
|
||||
if (itr == _creatureDataStore.end()) return nullptr;
|
||||
return &itr->second;
|
||||
}
|
||||
CreatureData& NewOrExistCreatureData(uint32 guid) { return _creatureDataStore[guid]; }
|
||||
@@ -1146,55 +1146,55 @@ class ObjectMgr
|
||||
GameObjectData const* GetGOData(uint32 guid) const
|
||||
{
|
||||
GameObjectDataContainer::const_iterator itr = _gameObjectDataStore.find(guid);
|
||||
if (itr == _gameObjectDataStore.end()) return NULL;
|
||||
if (itr == _gameObjectDataStore.end()) return nullptr;
|
||||
return &itr->second;
|
||||
}
|
||||
CreatureLocale const* GetCreatureLocale(uint32 entry) const
|
||||
{
|
||||
CreatureLocaleContainer::const_iterator itr = _creatureLocaleStore.find(entry);
|
||||
if (itr == _creatureLocaleStore.end()) return NULL;
|
||||
if (itr == _creatureLocaleStore.end()) return nullptr;
|
||||
return &itr->second;
|
||||
}
|
||||
GameObjectLocale const* GetGameObjectLocale(uint32 entry) const
|
||||
{
|
||||
GameObjectLocaleContainer::const_iterator itr = _gameObjectLocaleStore.find(entry);
|
||||
if (itr == _gameObjectLocaleStore.end()) return NULL;
|
||||
if (itr == _gameObjectLocaleStore.end()) return nullptr;
|
||||
return &itr->second;
|
||||
}
|
||||
ItemLocale const* GetItemLocale(uint32 entry) const
|
||||
{
|
||||
ItemLocaleContainer::const_iterator itr = _itemLocaleStore.find(entry);
|
||||
if (itr == _itemLocaleStore.end()) return NULL;
|
||||
if (itr == _itemLocaleStore.end()) return nullptr;
|
||||
return &itr->second;
|
||||
}
|
||||
ItemSetNameLocale const* GetItemSetNameLocale(uint32 entry) const
|
||||
{
|
||||
ItemSetNameLocaleContainer::const_iterator itr = _itemSetNameLocaleStore.find(entry);
|
||||
if (itr == _itemSetNameLocaleStore.end())return NULL;
|
||||
if (itr == _itemSetNameLocaleStore.end())return nullptr;
|
||||
return &itr->second;
|
||||
}
|
||||
PageTextLocale const* GetPageTextLocale(uint32 entry) const
|
||||
{
|
||||
PageTextLocaleContainer::const_iterator itr = _pageTextLocaleStore.find(entry);
|
||||
if (itr == _pageTextLocaleStore.end()) return NULL;
|
||||
if (itr == _pageTextLocaleStore.end()) return nullptr;
|
||||
return &itr->second;
|
||||
}
|
||||
QuestLocale const* GetQuestLocale(uint32 entry) const
|
||||
{
|
||||
QuestLocaleContainer::const_iterator itr = _questLocaleStore.find(entry);
|
||||
if (itr == _questLocaleStore.end()) return NULL;
|
||||
if (itr == _questLocaleStore.end()) return nullptr;
|
||||
return &itr->second;
|
||||
}
|
||||
GossipMenuItemsLocale const* GetGossipMenuItemsLocale(uint32 entry) const
|
||||
{
|
||||
GossipMenuItemsLocaleContainer::const_iterator itr = _gossipMenuItemsLocaleStore.find(entry);
|
||||
if (itr == _gossipMenuItemsLocaleStore.end()) return NULL;
|
||||
if (itr == _gossipMenuItemsLocaleStore.end()) return nullptr;
|
||||
return &itr->second;
|
||||
}
|
||||
PointOfInterestLocale const* GetPointOfInterestLocale(uint32 poi_id) const
|
||||
{
|
||||
PointOfInterestLocaleContainer::const_iterator itr = _pointOfInterestLocaleStore.find(poi_id);
|
||||
if (itr == _pointOfInterestLocaleStore.end()) return NULL;
|
||||
if (itr == _pointOfInterestLocaleStore.end()) return nullptr;
|
||||
return &itr->second;
|
||||
}
|
||||
QuestOfferRewardLocale const* GetQuestOfferRewardLocale(uint32 entry) const
|
||||
@@ -1212,7 +1212,7 @@ class ObjectMgr
|
||||
NpcTextLocale const* GetNpcTextLocale(uint32 entry) const
|
||||
{
|
||||
NpcTextLocaleContainer::const_iterator itr = _npcTextLocaleStore.find(entry);
|
||||
if (itr == _npcTextLocaleStore.end()) return NULL;
|
||||
if (itr == _npcTextLocaleStore.end()) return nullptr;
|
||||
return &itr->second;
|
||||
}
|
||||
GameObjectData& NewGOData(uint32 guid) { return _gameObjectDataStore[guid]; }
|
||||
@@ -1222,7 +1222,7 @@ class ObjectMgr
|
||||
{
|
||||
AcoreStringContainer::const_iterator itr = _acoreStringStore.find(entry);
|
||||
if (itr == _acoreStringStore.end())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
return &itr->second;
|
||||
}
|
||||
@@ -1258,7 +1258,7 @@ class ObjectMgr
|
||||
GameTele const* GetGameTele(uint32 id) const
|
||||
{
|
||||
GameTeleContainer::const_iterator itr = _gameTeleStore.find(id);
|
||||
if (itr == _gameTeleStore.end()) return NULL;
|
||||
if (itr == _gameTeleStore.end()) return nullptr;
|
||||
return &itr->second;
|
||||
}
|
||||
GameTele const* GetGameTele(std::string const& name) const;
|
||||
@@ -1270,7 +1270,7 @@ class ObjectMgr
|
||||
{
|
||||
CacheTrainerSpellContainer::const_iterator iter = _cacheTrainerSpellStore.find(entry);
|
||||
if (iter == _cacheTrainerSpellStore.end())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
return &iter->second;
|
||||
}
|
||||
@@ -1279,7 +1279,7 @@ class ObjectMgr
|
||||
{
|
||||
CacheVendorItemContainer::const_iterator iter = _cacheVendorItemStore.find(entry);
|
||||
if (iter == _cacheVendorItemStore.end())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
return &iter->second;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user