mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +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:
@@ -41,7 +41,7 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recvData*/)
|
||||
uint64 guid = _player->GetGUID();
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_GET_CALENDAR [" UI64FMTD "]", guid);
|
||||
|
||||
time_t currTime = time(NULL);
|
||||
time_t currTime = time(nullptr);
|
||||
|
||||
WorldPacket data(SMSG_CALENDAR_SEND_CALENDAR, 1000); // Average size if no instance
|
||||
|
||||
@@ -243,7 +243,7 @@ void WorldSession::HandleCalendarAddEvent(WorldPacket& recvData)
|
||||
|
||||
// prevent events in the past
|
||||
// To Do: properly handle timezones and remove the "- time_t(86400L)" hack
|
||||
if (time_t(eventPackedTime) < (time(NULL) - time_t(86400L)))
|
||||
if (time_t(eventPackedTime) < (time(nullptr) - time_t(86400L)))
|
||||
{
|
||||
recvData.rfinish();
|
||||
sCalendarMgr->SendCalendarCommandResult(guid, CALENDAR_ERROR_EVENT_PASSED);
|
||||
@@ -326,7 +326,7 @@ void WorldSession::HandleCalendarAddEvent(WorldPacket& recvData)
|
||||
catch (ByteBufferException const&)
|
||||
{
|
||||
delete calendarEvent;
|
||||
calendarEvent = NULL;
|
||||
calendarEvent = nullptr;
|
||||
throw;
|
||||
}
|
||||
|
||||
@@ -376,7 +376,7 @@ void WorldSession::HandleCalendarUpdateEvent(WorldPacket& recvData)
|
||||
|
||||
// prevent events in the past
|
||||
// To Do: properly handle timezones and remove the "- time_t(86400L)" hack
|
||||
if (time_t(eventPackedTime) < (time(NULL) - time_t(86400L)))
|
||||
if (time_t(eventPackedTime) < (time(nullptr) - time_t(86400L)))
|
||||
{
|
||||
recvData.rfinish();
|
||||
return;
|
||||
@@ -433,7 +433,7 @@ void WorldSession::HandleCalendarCopyEvent(WorldPacket& recvData)
|
||||
|
||||
// prevent events in the past
|
||||
// To Do: properly handle timezones and remove the "- time_t(86400L)" hack
|
||||
if (time_t(eventTime) < (time(NULL) - time_t(86400L)))
|
||||
if (time_t(eventTime) < (time(nullptr) - time_t(86400L)))
|
||||
{
|
||||
recvData.rfinish();
|
||||
sCalendarMgr->SendCalendarCommandResult(guid, CALENDAR_ERROR_EVENT_PASSED);
|
||||
@@ -617,7 +617,7 @@ void WorldSession::HandleCalendarEventSignup(WorldPacket& recvData)
|
||||
}
|
||||
|
||||
CalendarInviteStatus status = tentative ? CALENDAR_STATUS_TENTATIVE : CALENDAR_STATUS_SIGNED_UP;
|
||||
CalendarInvite* invite = new CalendarInvite(sCalendarMgr->GetFreeInviteId(), eventId, guid, guid, time(NULL), status, CALENDAR_RANK_PLAYER, "");
|
||||
CalendarInvite* invite = new CalendarInvite(sCalendarMgr->GetFreeInviteId(), eventId, guid, guid, time(nullptr), status, CALENDAR_RANK_PLAYER, "");
|
||||
sCalendarMgr->AddInvite(calendarEvent, invite);
|
||||
sCalendarMgr->SendCalendarClearPendingAction(guid);
|
||||
}
|
||||
@@ -649,7 +649,7 @@ void WorldSession::HandleCalendarEventRsvp(WorldPacket& recvData)
|
||||
if (CalendarInvite* invite = sCalendarMgr->GetInvite(inviteId))
|
||||
{
|
||||
invite->SetStatus(CalendarInviteStatus(status));
|
||||
invite->SetStatusTime(time(NULL));
|
||||
invite->SetStatusTime(time(nullptr));
|
||||
|
||||
sCalendarMgr->UpdateInvite(invite);
|
||||
sCalendarMgr->SendCalendarEventStatus(*calendarEvent, *invite);
|
||||
@@ -713,7 +713,7 @@ void WorldSession::HandleCalendarEventStatus(WorldPacket& recvData)
|
||||
{
|
||||
invite->SetStatus((CalendarInviteStatus)status);
|
||||
// not sure if we should set response time when moderator changes invite status
|
||||
//invite->SetStatusTime(time(NULL));
|
||||
//invite->SetStatusTime(time(nullptr));
|
||||
|
||||
sCalendarMgr->UpdateInvite(invite);
|
||||
sCalendarMgr->SendCalendarEventStatus(*calendarEvent, *invite);
|
||||
@@ -813,7 +813,7 @@ void WorldSession::HandleSetSavedInstanceExtend(WorldPacket& recvData)
|
||||
void WorldSession::SendCalendarRaidLockout(InstanceSave const* save, bool add)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "%s", add ? "SMSG_CALENDAR_RAID_LOCKOUT_ADDED" : "SMSG_CALENDAR_RAID_LOCKOUT_REMOVED");
|
||||
time_t currTime = time(NULL);
|
||||
time_t currTime = time(nullptr);
|
||||
|
||||
WorldPacket data(SMSG_CALENDAR_RAID_LOCKOUT_REMOVED, (add ? 4 : 0) + 4 + 4 + 4 + 8);
|
||||
if (add)
|
||||
@@ -831,7 +831,7 @@ void WorldSession::SendCalendarRaidLockout(InstanceSave const* save, bool add)
|
||||
|
||||
void WorldSession::SendCalendarRaidLockoutUpdated(InstanceSave const* save, bool isExtended)
|
||||
{
|
||||
time_t currTime = time(NULL);
|
||||
time_t currTime = time(nullptr);
|
||||
time_t resetTime = isExtended ? save->GetExtendedResetTime() : save->GetResetTime();
|
||||
time_t resetTimeOp = isExtended ? save->GetResetTime() : save->GetExtendedResetTime();
|
||||
WorldPacket data(SMSG_CALENDAR_RAID_LOCKOUT_UPDATED, 4 + 4 + 4 + 4 + 8);
|
||||
|
||||
Reference in New Issue
Block a user