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/SMS/src/functions.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/SMS/src/functions.cpp')
-rw-r--r-- | plugins/SMS/src/functions.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/SMS/src/functions.cpp b/plugins/SMS/src/functions.cpp index 7f36b72935..78c7f5851c 100644 --- a/plugins/SMS/src/functions.cpp +++ b/plugins/SMS/src/functions.cpp @@ -32,7 +32,7 @@ LPSTR GetModuleName(MCONTACT hContact) if (hContact) {
lpszRet = GetContactProto(hContact);
- if (lpszRet == NULL)
+ if (lpszRet == nullptr)
lpszRet = PROTOCOL_NAMEA;
}
else lpszRet = PROTOCOL_NAMEA;
@@ -243,7 +243,7 @@ BOOL GetXMLFieldEx(LPSTR lpszXML, size_t dwXMLSize, LPSTR *plpszData, size_t *pd {
BOOL bRet = FALSE;
int thisLevel = 0;
- LPSTR lpszFindTag = (LPSTR)tag1, lpszTagEnd = lpszXML, lpszDataStart = NULL;
+ LPSTR lpszFindTag = (LPSTR)tag1, lpszTagEnd = lpszXML, lpszDataStart = nullptr;
va_list va;
va_start(va, tag1);
@@ -272,7 +272,7 @@ BOOL GetXMLFieldEx(LPSTR lpszXML, size_t dwXMLSize, LPSTR *plpszData, size_t *pd if (++thisLevel == 1)
if (CompareStringA(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), NORM_IGNORECASE, lpszFindTag, -1, lpszTagStart, ((lpszTagEnd + 1) - lpszTagStart)) == CSTR_EQUAL) {
lpszFindTag = va_arg(va, LPSTR);
- if (lpszFindTag == NULL) lpszDataStart = (lpszTagEnd + 2);
+ if (lpszFindTag == nullptr) lpszDataStart = (lpszTagEnd + 2);
thisLevel = 0;
}
}
@@ -286,7 +286,7 @@ BOOL GetXMLFieldExBuff(LPSTR lpszXML, size_t dwXMLSize, LPSTR lpszBuff, size_t d {
BOOL bRet = FALSE;
int thisLevel = 0;
- LPSTR lpszFindTag = (LPSTR)tag1, lpszTagStart, lpszTagEnd = lpszXML, lpszDataStart = NULL;
+ LPSTR lpszFindTag = (LPSTR)tag1, lpszTagStart, lpszTagEnd = lpszXML, lpszDataStart = nullptr;
va_list va;
@@ -313,7 +313,7 @@ BOOL GetXMLFieldExBuff(LPSTR lpszXML, size_t dwXMLSize, LPSTR lpszBuff, size_t d if (++thisLevel == 1)
if (CompareStringA(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), NORM_IGNORECASE, lpszFindTag, -1, lpszTagStart, ((lpszTagEnd + 1) - lpszTagStart)) == CSTR_EQUAL) {
lpszFindTag = va_arg(va, LPSTR);
- if (lpszFindTag == NULL) lpszDataStart = (lpszTagEnd + 2);
+ if (lpszFindTag == nullptr) lpszDataStart = (lpszTagEnd + 2);
thisLevel = 0;
}
}
@@ -359,7 +359,7 @@ DWORD ReplaceInBuff(LPVOID lpInBuff, size_t dwInBuffSize, size_t dwReplaceItemsC while (dwFoundedCount) {
// looking for first to replace
for (i = 0; i < dwReplaceItemsCount; i++)
- if (plpszFound[i] && (plpszFound[i] < plpszFound[dwFirstFoundedIndex] || plpszFound[dwFirstFoundedIndex] == NULL))
+ if (plpszFound[i] && (plpszFound[i] < plpszFound[dwFirstFoundedIndex] || plpszFound[dwFirstFoundedIndex] == nullptr))
dwFirstFoundedIndex = i;
// in founded
|