From 1b1767e9f4c20d1e20541968de98d00814f63247 Mon Sep 17 00:00:00 2001 From: Yehonal Date: Sat, 20 Aug 2016 09:49:37 +0200 Subject: Fix commands and starting to use nullptr instead of NULL --- src/scripts/Commands/cs_event.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/scripts/Commands/cs_event.cpp') diff --git a/src/scripts/Commands/cs_event.cpp b/src/scripts/Commands/cs_event.cpp index 2738d9c7ed..596750f5a8 100644 --- a/src/scripts/Commands/cs_event.cpp +++ b/src/scripts/Commands/cs_event.cpp @@ -29,13 +29,11 @@ public: { "activelist", SEC_GAMEMASTER, true, &HandleEventActiveListCommand, "" }, { "start", SEC_GAMEMASTER, true, &HandleEventStartCommand, "" }, { "stop", SEC_GAMEMASTER, true, &HandleEventStopCommand, "" }, - { "", SEC_GAMEMASTER, true, &HandleEventInfoCommand, "" }, - { NULL, 0, false, NULL, "" } + { "", SEC_GAMEMASTER, true, &HandleEventInfoCommand, "" } }; static std::vector commandTable = { - { "event", SEC_GAMEMASTER, false, NULL, "", eventCommandTable }, - { NULL, 0, false, NULL, "" } + { "event", SEC_GAMEMASTER, false, nullptr, "", eventCommandTable } }; return commandTable; } @@ -106,8 +104,8 @@ public: std::string endTimeStr = TimeToTimestampStr(eventData.end); uint32 delay = sGameEventMgr->NextCheck(eventId); - time_t nextTime = time(NULL) + delay; - std::string nextStr = nextTime >= eventData.start && nextTime < eventData.end ? TimeToTimestampStr(time(NULL) + delay) : "-"; + time_t nextTime = time(nullptr) + delay; + std::string nextStr = nextTime >= eventData.start && nextTime < eventData.end ? TimeToTimestampStr(time(nullptr) + delay) : "-"; std::string occurenceStr = secsToTimeString(eventData.occurence * MINUTE, true); std::string lengthStr = secsToTimeString(eventData.length * MINUTE, true); -- cgit v1.2.3