From a7c24ca48995cf2bf436156302f96b91bf135409 Mon Sep 17 00:00:00 2001 From: Goraf <22941576+Goraf@users.noreply.github.com> Date: Mon, 13 Nov 2017 15:03:31 +0100 Subject: Code modernize ... * replace 0/NULL with nullptr [using clang-tidy] --- protocols/JabberG/src/jabber_chat.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'protocols/JabberG/src/jabber_chat.cpp') diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index 6a887eadf0..252d82ee82 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -234,7 +234,7 @@ void CJabberProto::GcLogShowInformation(JABBER_LIST_ITEM *item, pResourceStatus gce.ptszUID = user->m_tszResourceName; gce.ptszText = buf; gce.dwFlags = GCEF_ADDTOLOG; - gce.time = time(0); + gce.time = time(nullptr); Chat_Event(&gce); } } @@ -263,7 +263,7 @@ void CJabberProto::GcLogUpdateMemberStatus(JABBER_LIST_ITEM *item, const wchar_t gce.ptszText = szReason; if (item->bChatActive == 2) { gce.dwFlags |= GCEF_ADDTOLOG; - gce.time = time(0); + gce.time = time(nullptr); } switch (gce.iType = action) { @@ -1137,7 +1137,7 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* if ((GetTickCount() - dwLastBanKickTime) > BAN_KICK_INTERVAL) { wchar_t *resourceName_copy = NEWWSTR_ALLOCA(him->m_tszResourceName); // copy resource name to prevent possible crash if user list rebuilds - wchar_t *szInviteTo = 0; + wchar_t *szInviteTo = nullptr; int idx = gch->dwData - IDM_LINK0; LISTFOREACH(i, ppro, LIST_CHATROOM) { @@ -1382,7 +1382,7 @@ int CJabberProto::JabberGcEventHook(WPARAM, LPARAM lParam) if (m_bJabberOnline) { wchar_t tszID[100]; - int64_t id = (_time64(0) << 16) + (GetTickCount() & 0xFFFF); + int64_t id = (_time64(nullptr) << 16) + (GetTickCount() & 0xFFFF); wchar_t *buf = NEWWSTR_ALLOCA(gch->ptszText); Chat_UnescapeTags(buf); -- cgit v1.2.3