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

@@ -171,7 +171,7 @@ WorldSession::~WorldSession()
std::string const& WorldSession::GetPlayerName() const
{
return _player != NULL ? _player->GetName() : DefaultPlayerName;
return _player != nullptr ? _player->GetName() : DefaultPlayerName;
}
std::string WorldSession::GetPlayerInfo() const
@@ -179,7 +179,7 @@ std::string WorldSession::GetPlayerInfo() const
std::ostringstream ss;
ss << "[Player: " << GetPlayerName()
<< " (Guid: " << (_player != NULL ? _player->GetGUID() : 0)
<< " (Guid: " << (_player != nullptr ? _player->GetGUID() : 0)
<< ", Account: " << GetAccountId() << ")]";
return ss.str();
@@ -765,7 +765,7 @@ void WorldSession::SetAccountData(AccountDataType type, time_t tm, std::string c
}
else
{
// _player can be NULL and packet received after logout but m_GUID still store correct guid
// _player can be nullptr and packet received after logout but m_GUID still store correct guid
if (!m_GUIDLow)
return;
@@ -1160,7 +1160,7 @@ void WorldSession::SetPlayer(Player* player)
void WorldSession::InitializeQueryCallbackParameters()
{
// Callback parameters that have pointers in them should be properly
// initialized to NULL here.
// initialized to nullptr here.
_charCreateCallback.SetParam(nullptr);
_loadPetFromDBFirstCallback.SetFirstParam(0);
_loadPetFromDBFirstCallback.SetSecondParam(nullptr);