summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_groupchat.cpp
diff options
context:
space:
mode:
authorGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:03:31 +0100
committerGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:07:33 +0100
commita7c24ca48995cf2bf436156302f96b91bf135409 (patch)
tree953835509ff1b778833e78fd7b74b05e05e77c84 /protocols/JabberG/src/jabber_groupchat.cpp
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'protocols/JabberG/src/jabber_groupchat.cpp')
-rw-r--r--protocols/JabberG/src/jabber_groupchat.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp
index 1ec5ec20c4..294c197487 100644
--- a/protocols/JabberG/src/jabber_groupchat.cpp
+++ b/protocols/JabberG/src/jabber_groupchat.cpp
@@ -277,8 +277,8 @@ static int sttRoomListAppend(HWND hwndList, RoomInfo::Overlay overlay, const wch
{
RoomInfo *info = (RoomInfo *)mir_alloc(sizeof(RoomInfo));
info->overlay = overlay;
- info->line1 = line1 ? mir_wstrdup(line1) : 0;
- info->line2 = line2 ? mir_wstrdup(line2) : 0;
+ info->line1 = line1 ? mir_wstrdup(line1) : nullptr;
+ info->line2 = line2 ? mir_wstrdup(line2) : nullptr;
int id = SendMessage(hwndList, CB_ADDSTRING, 0, (LPARAM)name);
SendMessage(hwndList, CB_SETITEMDATA, id, (LPARAM)info);
@@ -650,7 +650,7 @@ INT_PTR CJabberDlgGcJoin::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
LISTFOREACH(i, m_proto, LIST_BOOKMARK)
{
- JABBER_LIST_ITEM *item = 0;
+ JABBER_LIST_ITEM *item = nullptr;
if (item = m_proto->ListGetItemPtrFromIndex(i))
if (!mir_wstrcmp(item->type, L"conference"))
AppendMenu(hMenu, MF_STRING, (UINT_PTR)item, item->name);
@@ -800,7 +800,7 @@ void CJabberProto::RenameParticipantNick(JABBER_LIST_ITEM *item, const wchar_t *
GCEVENT gce = { m_szModuleName, item->jid, GC_EVENT_NICK };
if (jid != nullptr)
gce.ptszUserInfo = jid;
- gce.time = time(0);
+ gce.time = time(nullptr);
gce.ptszNick = oldNick;
gce.ptszUID = newNick;
gce.ptszText = newNick;
@@ -946,7 +946,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node)
// leaving room
else if (!mir_wstrcmp(type, L"unavailable")) {
- const wchar_t *str = 0;
+ const wchar_t *str = nullptr;
if (xNode != nullptr && item->nick != nullptr) {
HXML reasonNode = XmlGetChild(itemNode, "reason");
str = XmlGetAttrValue(itemNode, L"jid");