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

@@ -18,7 +18,7 @@ namespace FactorySelector
{
CreatureAI* selectAI(Creature* creature)
{
const CreatureAICreator* ai_factory = NULL;
const CreatureAICreator* ai_factory = nullptr;
CreatureAIRegistry& ai_registry(*CreatureAIRegistry::instance());
// xinef: if we have controlable guardian, define petai for players as they can steer him, otherwise db / normal ai
@@ -84,7 +84,7 @@ namespace FactorySelector
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
// select NullCreatureAI if not another cases
ainame = (ai_factory == NULL) ? "NullCreatureAI" : ai_factory->key();
ainame = (ai_factory == nullptr) ? "NullCreatureAI" : ai_factory->key();
sLog->outDebug(LOG_FILTER_TSCR, "Creature %u used AI is %s.", creature->GetGUIDLow(), ainame.c_str());
#endif
return (ai_factory == NULL ? new NullCreatureAI(creature) : ai_factory->Create(creature));
@@ -96,7 +96,7 @@ namespace FactorySelector
ASSERT(creature->GetCreatureTemplate());
const MovementGeneratorCreator* mv_factory = mv_registry.GetRegistryItem(creature->GetDefaultMovementType());
/* if (mv_factory == NULL)
/* if (mv_factory == nullptr)
{
int best_val = -1;
StringVector l;
@@ -105,7 +105,7 @@ namespace FactorySelector
{
const MovementGeneratorCreator *factory = mv_registry.GetRegistryItem((*iter).c_str());
const SelectableMovement *p = dynamic_cast<const SelectableMovement *>(factory);
ASSERT(p != NULL);
ASSERT(p != nullptr);
int val = p->Permit(creature);
if (val > best_val)
{
@@ -121,7 +121,7 @@ namespace FactorySelector
GameObjectAI* SelectGameObjectAI(GameObject* go)
{
const GameObjectAICreator* ai_factory = NULL;
const GameObjectAICreator* ai_factory = nullptr;
GameObjectAIRegistry& ai_registry(*GameObjectAIRegistry::instance());
if (GameObjectAI* scriptedAI = sScriptMgr->GetGameObjectAI(go))