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:
Kitzunu
2020-08-31 11:55:09 +02:00
committed by GitHub
parent 38903b5dfb
commit 1f89282b22
325 changed files with 2348 additions and 2348 deletions

View File

@@ -16,7 +16,7 @@
#include "Player.h"
#include "Opcodes.h"
inline float GetAge(uint64 t) { return float(time(NULL) - t) / DAY; }
inline float GetAge(uint64 t) { return float(time(nullptr) - t) / DAY; }
///////////////////////////////////////////////////////////////////////////////////////////////////
// GM ticket
@@ -24,7 +24,7 @@ GmTicket::GmTicket() : _id(0), _playerGuid(0), _type(TICKET_TYPE_OPEN), _posX(0)
_closedBy(0), _resolvedBy(0), _assignedTo(0), _completed(false), _escalatedStatus(TICKET_UNASSIGNED), _viewed(false),
_needResponse(false), _needMoreHelp(false) { }
GmTicket::GmTicket(Player* player) : _type(TICKET_TYPE_OPEN), _createTime(time(NULL)), _lastModifiedTime(time(NULL)), _closedBy(0), _resolvedBy(0), _assignedTo(0), _completed(false), _escalatedStatus(TICKET_UNASSIGNED), _viewed(false), _needMoreHelp(false)
GmTicket::GmTicket(Player* player) : _type(TICKET_TYPE_OPEN), _createTime(time(nullptr)), _lastModifiedTime(time(nullptr)), _closedBy(0), _resolvedBy(0), _assignedTo(0), _completed(false), _escalatedStatus(TICKET_UNASSIGNED), _viewed(false), _needMoreHelp(false)
{
_id = sTicketMgr->GenerateTicketId();
_playerName = player->GetName();
@@ -147,7 +147,7 @@ void GmTicket::SendResponse(WorldSession* session) const
std::string GmTicket::FormatMessageString(ChatHandler& handler, bool detailed) const
{
time_t curTime = time(NULL);
time_t curTime = time(nullptr);
std::stringstream ss;
ss << handler.PGetParseString(LANG_COMMAND_TICKETLISTGUID, _id);
@@ -235,7 +235,7 @@ void GmTicket::SetChatLog(std::list<uint32> time, std::string const& log)
///////////////////////////////////////////////////////////////////////////////////////////////////
// Ticket manager
TicketMgr::TicketMgr() : _status(true), _lastTicketId(0), _lastSurveyId(0), _openTicketCount(0), _lastChange(time(NULL)) { }
TicketMgr::TicketMgr() : _status(true), _lastTicketId(0), _lastSurveyId(0), _openTicketCount(0), _lastChange(time(nullptr)) { }
TicketMgr::~TicketMgr()
{
@@ -336,7 +336,7 @@ void TicketMgr::AddTicket(GmTicket* ticket)
_ticketList[ticket->GetId()] = ticket;
if (!ticket->IsClosed())
++_openTicketCount;
SQLTransaction trans = SQLTransaction(NULL);
SQLTransaction trans = SQLTransaction(nullptr);
ticket->SaveToDB(trans);
}
@@ -344,7 +344,7 @@ void TicketMgr::CloseTicket(uint32 ticketId, int64 source)
{
if (GmTicket* ticket = GetTicket(ticketId))
{
SQLTransaction trans = SQLTransaction(NULL);
SQLTransaction trans = SQLTransaction(nullptr);
ticket->SetClosedBy(source);
if (source)
--_openTicketCount;
@@ -366,7 +366,7 @@ void TicketMgr::ResolveAndCloseTicket(uint32 ticketId, int64 source)
{
if (GmTicket* ticket = GetTicket(ticketId))
{
SQLTransaction trans = SQLTransaction(NULL);
SQLTransaction trans = SQLTransaction(nullptr);
ticket->SetClosedBy(source);
ticket->SetResolvedBy(source);
if (source)