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 /plugins/NotesAndReminders/src/miscutils.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/NotesAndReminders/src/miscutils.cpp')
-rw-r--r-- | plugins/NotesAndReminders/src/miscutils.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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)
|