mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 09:39:11 +00:00
refactor(Core): replace NULL with nullptr (#4593)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user