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/NotesAndReminders/src/miscutils.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/NotesAndReminders/src/miscutils.cpp') diff --git a/plugins/NotesAndReminders/src/miscutils.cpp b/plugins/NotesAndReminders/src/miscutils.cpp index 5add0c6e07..04d08f00ed 100644 --- a/plugins/NotesAndReminders/src/miscutils.cpp +++ b/plugins/NotesAndReminders/src/miscutils.cpp @@ -33,7 +33,7 @@ void ReadSettingBlob(MCONTACT hContact, char *ModuleName, char *SettingName, WOR dbv.type = DBVT_BLOB; if (db_get(hContact, ModuleName, SettingName, &dbv)) { *pSize = 0; - *pbBlob = NULL; + *pbBlob = nullptr; } else { *pSize = LOWORD(dbv.cpbVal); @@ -88,11 +88,11 @@ void TreeAddSorted(TREEELEMENT **root, void *Data, int(*CompareCb)(TREEELEMENT*, return; NTE->ptrdata = Data; - NTE->next = NULL; + NTE->next = nullptr; // insert sorted - TREEELEMENT *Prev = NULL; + TREEELEMENT *Prev = nullptr; TREEELEMENT *TTE = *root; while (TTE) { @@ -119,7 +119,7 @@ void TreeAddSorted(TREEELEMENT **root, void *Data, int(*CompareCb)(TREEELEMENT*, void TreeDelete(TREEELEMENT **root, void *iItem) { - TREEELEMENT *TTE = *root, *Prev = NULL; + TREEELEMENT *TTE = *root, *Prev = nullptr; if (!TTE) return; @@ -139,7 +139,7 @@ void TreeDelete(TREEELEMENT **root, void *iItem) void *TreeGetAt(TREEELEMENT *root, int iItem) { if (!root) - return NULL; + return nullptr; TREEELEMENT *TTE = root; int i = 0; @@ -147,7 +147,7 @@ void *TreeGetAt(TREEELEMENT *root, int iItem) TTE = (TREEELEMENT*)TTE->next; i++; } - return (!TTE) ? NULL : TTE->ptrdata; + return (!TTE) ? nullptr : TTE->ptrdata; } int TreeGetCount(TREEELEMENT *root) -- cgit v1.2.3