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] --- plugins/Variables/src/parse_metacontacts.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'plugins/Variables/src/parse_metacontacts.cpp') diff --git a/plugins/Variables/src/parse_metacontacts.cpp b/plugins/Variables/src/parse_metacontacts.cpp index 9fc394c6f9..b071cd4c25 100644 --- a/plugins/Variables/src/parse_metacontacts.cpp +++ b/plugins/Variables/src/parse_metacontacts.cpp @@ -22,19 +22,19 @@ static wchar_t *parseGetParent(ARGUMENTSINFO *ai) { if (ai->argc != 2) - return NULL; + return nullptr; MCONTACT hContact = getContactFromString(ai->targv[1], CI_ALLFLAGS); if (hContact == INVALID_CONTACT_ID) - return NULL; + return nullptr; hContact = db_mc_getMeta(hContact); if (hContact == NULL) - return NULL; + return nullptr; ptrW szUniqueID; char* szProto = GetContactProto(hContact); - if (szProto != NULL) + if (szProto != nullptr) szUniqueID = getContactInfoT(CNF_UNIQUEID, hContact); if (szUniqueID == NULL) { @@ -50,19 +50,19 @@ static wchar_t *parseGetParent(ARGUMENTSINFO *ai) static wchar_t *parseGetDefault(ARGUMENTSINFO *ai) { if (ai->argc != 2) - return NULL; + return nullptr; MCONTACT hContact = getContactFromString(ai->targv[1], CI_ALLFLAGS); if (hContact == INVALID_CONTACT_ID) - return NULL; + return nullptr; hContact = db_mc_getDefault(hContact); if (hContact == NULL) - return NULL; + return nullptr; ptrW szUniqueID; char* szProto = GetContactProto(hContact); - if (szProto != NULL) + if (szProto != nullptr) szUniqueID = getContactInfoT(CNF_UNIQUEID, hContact); if (szUniqueID == NULL) { @@ -78,19 +78,19 @@ static wchar_t *parseGetDefault(ARGUMENTSINFO *ai) static wchar_t *parseGetMostOnline(ARGUMENTSINFO *ai) { if (ai->argc != 2) - return NULL; + return nullptr; MCONTACT hContact = getContactFromString(ai->targv[1], CI_ALLFLAGS); if (hContact == INVALID_CONTACT_ID) - return NULL; + return nullptr; hContact = db_mc_getMostOnline(hContact); if (hContact == NULL) - return NULL; + return nullptr; ptrW szUniqueID; char *szProto = GetContactProto(hContact); - if (szProto != NULL) + if (szProto != nullptr) szUniqueID = getContactInfoT(CNF_UNIQUEID, hContact); if (szUniqueID == NULL) { -- cgit v1.2.3