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/IRCG/src/clist.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'protocols/IRCG/src/clist.cpp') diff --git a/protocols/IRCG/src/clist.cpp b/protocols/IRCG/src/clist.cpp index 1b5cf219c1..8409c501e7 100644 --- a/protocols/IRCG/src/clist.cpp +++ b/protocols/IRCG/src/clist.cpp @@ -29,14 +29,14 @@ BOOL CIrcProto::CList_AddDCCChat(const CMStringW& name, const CMStringW& hostmas char szService[256]; bool bFlag = false; - CONTACT usertemp = { name, NULL, NULL, false, false, true }; + CONTACT usertemp = { name, nullptr, nullptr, false, false, true }; MCONTACT hc = CList_FindContact(&usertemp); if (hc && db_get_b(hc, "CList", "NotOnList", 0) == 0 && db_get_b(hc, "CList", "Hidden", 0) == 0) bFlag = true; CMStringW contactname = name; contactname += DCCSTRING; - CONTACT user = { contactname, NULL, NULL, false, false, true }; + CONTACT user = { contactname, nullptr, nullptr, false, false, true }; hContact = CList_AddContact(&user, false, false); setByte(hContact, "DCC", 1); @@ -82,7 +82,7 @@ BOOL CIrcProto::CList_AddDCCChat(const CMStringW& name, const CMStringW& hostmas MCONTACT CIrcProto::CList_AddContact(CONTACT *user, bool InList, bool SetOnline) { - if (user->name == NULL) + if (user->name == nullptr) return 0; MCONTACT hContact = CList_FindContact(user); @@ -198,7 +198,7 @@ MCONTACT CIrcProto::CList_FindContact(CONTACT *user) hContact_temp = hContact; } } - else if (wcschr(user->name, ' ') == 0) { + else if (wcschr(user->name, ' ') == nullptr) { if ((DBDefault && !mir_wstrcmpi(DBDefault, user->name) || DBNick && !mir_wstrcmpi(DBNick, user->name) || DBWildcard && WCCmp(DBWildcard, lowercasename)) && (WCCmp(DBUser, user->user) && WCCmp(DBHost, user->host))) { -- cgit v1.2.3