diff options
author | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:03:31 +0100 |
---|---|---|
committer | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:07:33 +0100 |
commit | a7c24ca48995cf2bf436156302f96b91bf135409 (patch) | |
tree | 953835509ff1b778833e78fd7b74b05e05e77c84 /protocols/JabberG/src/jabber_chat.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'protocols/JabberG/src/jabber_chat.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_chat.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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);
|