refactor(Core): replace NULL with nullptr (#4593)

This commit is contained in:
Kitzunu
2021-03-02 01:34:20 +01:00
committed by GitHub
parent dbefa17a53
commit 28f1dc5c0c
231 changed files with 923 additions and 923 deletions

View File

@@ -86,7 +86,7 @@ namespace FactorySelector
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));
return (ai_factory == nullptr ? new NullCreatureAI(creature) : ai_factory->Create(creature));
}
MovementGenerator* selectMovementGenerator(Creature* creature)
@@ -114,7 +114,7 @@ namespace FactorySelector
}
}*/
return (mv_factory == NULL ? NULL : mv_factory->Create(creature));
return (mv_factory == nullptr ? nullptr : mv_factory->Create(creature));
}
GameObjectAI* SelectGameObjectAI(GameObject* go)
@@ -130,10 +130,10 @@ namespace FactorySelector
//future goAI types go here
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
std::string ainame = (ai_factory == NULL || go->GetScriptId()) ? "NullGameObjectAI" : ai_factory->key();
std::string ainame = (ai_factory == nullptr || go->GetScriptId()) ? "NullGameObjectAI" : ai_factory->key();
sLog->outDebug(LOG_FILTER_TSCR, "GameObject %u used AI is %s.", go->GetGUIDLow(), ainame.c_str());
#endif
return (ai_factory == NULL ? new NullGameObjectAI(go) : ai_factory->Create(go));
return (ai_factory == nullptr ? new NullGameObjectAI(go) : ai_factory->Create(go));
}
}