mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
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:
@@ -136,7 +136,7 @@ void WorldSocket::CloseSocket(std::string const& reason)
|
||||
{
|
||||
ACE_GUARD (LockType, Guard, m_SessionLock);
|
||||
|
||||
m_Session = NULL;
|
||||
m_Session = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -435,7 +435,7 @@ int WorldSocket::handle_close(ACE_HANDLE h, ACE_Reactor_Mask)
|
||||
{
|
||||
ACE_GUARD_RETURN (LockType, Guard, m_SessionLock, -1);
|
||||
|
||||
m_Session = NULL;
|
||||
m_Session = nullptr;
|
||||
}
|
||||
|
||||
reactor()->remove_handler(this, ACE_Event_Handler::DONT_CALL | ACE_Event_Handler::ALL_EVENTS_MASK);
|
||||
@@ -466,7 +466,7 @@ int WorldSocket::Update(void)
|
||||
|
||||
int WorldSocket::handle_input_header(void)
|
||||
{
|
||||
ACE_ASSERT (m_RecvWPct == NULL);
|
||||
ACE_ASSERT (m_RecvWPct == nullptr);
|
||||
|
||||
ACE_ASSERT (m_Header.length() == sizeof(ClientPktHeader));
|
||||
|
||||
@@ -479,7 +479,7 @@ int WorldSocket::handle_input_header(void)
|
||||
|
||||
if ((header.size < 4) || (header.size > 10240) || (header.cmd > 10240))
|
||||
{
|
||||
Player* _player = m_Session ? m_Session->GetPlayer() : NULL;
|
||||
Player* _player = m_Session ? m_Session->GetPlayer() : nullptr;
|
||||
sLog->outError("WorldSocket::handle_input_header(): client (account: %u, char [GUID: %u, name: %s]) sent malformed packet (size: %d, cmd: %d)", m_Session ? m_Session->GetAccountId() : 0, _player ? _player->GetGUIDLow() : 0, _player ? _player->GetName().c_str() : "<none>", header.size, header.cmd);
|
||||
|
||||
errno = EINVAL;
|
||||
@@ -510,13 +510,13 @@ int WorldSocket::handle_input_payload(void)
|
||||
|
||||
ACE_ASSERT (m_RecvPct.space() == 0);
|
||||
ACE_ASSERT (m_Header.space() == 0);
|
||||
ACE_ASSERT (m_RecvWPct != NULL);
|
||||
ACE_ASSERT (m_RecvWPct != nullptr);
|
||||
|
||||
const int ret = ProcessIncoming (m_RecvWPct);
|
||||
|
||||
m_RecvPct.base (NULL, 0);
|
||||
m_RecvPct.base (nullptr, 0);
|
||||
m_RecvPct.reset();
|
||||
m_RecvWPct = NULL;
|
||||
m_RecvWPct = nullptr;
|
||||
|
||||
m_Header.reset();
|
||||
|
||||
@@ -699,7 +699,7 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct)
|
||||
{
|
||||
ACE_GUARD_RETURN (LockType, Guard, m_SessionLock, -1);
|
||||
|
||||
if (m_Session != NULL)
|
||||
if (m_Session != nullptr)
|
||||
{
|
||||
// Our Idle timer will reset on any non PING opcodes.
|
||||
// Catches people idling on the login screen and any lingering ingame connections.
|
||||
@@ -849,7 +849,7 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
||||
//! Negative mutetime indicates amount of seconds to be muted effective on next login - which is now.
|
||||
if (mutetime < 0)
|
||||
{
|
||||
mutetime = time(NULL) + llabs(mutetime);
|
||||
mutetime = time(nullptr) + llabs(mutetime);
|
||||
|
||||
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_MUTE_TIME_LOGIN);
|
||||
|
||||
@@ -941,7 +941,7 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
||||
sha.UpdateData ((uint8 *) & t, 4);
|
||||
sha.UpdateData ((uint8 *) & clientSeed, 4);
|
||||
sha.UpdateData ((uint8 *) & seed, 4);
|
||||
sha.UpdateBigNumbers (&k, NULL);
|
||||
sha.UpdateBigNumbers (&k, nullptr);
|
||||
sha.Finalize();
|
||||
|
||||
if (memcmp (sha.GetDigest(), digest, 20))
|
||||
|
||||
Reference in New Issue
Block a user