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/WebView/src/webview_getdata.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/WebView/src/webview_getdata.cpp')
-rw-r--r-- | plugins/WebView/src/webview_getdata.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/WebView/src/webview_getdata.cpp b/plugins/WebView/src/webview_getdata.cpp index 3e0c656a0a..ef9ba7fa7e 100644 --- a/plugins/WebView/src/webview_getdata.cpp +++ b/plugins/WebView/src/webview_getdata.cpp @@ -115,7 +115,7 @@ void GetData(void *param) headers[0].szValue = NETLIB_USER_AGENT;
headers[1].szName = "Content-Length";
- headers[1].szValue = NULL;
+ headers[1].szValue = nullptr;
nlhr.headers = headers;
@@ -181,7 +181,7 @@ void GetData(void *param) mir_strncpy(truncated, truncated2, MAXSIZE1);
else { // use start and end string
// putting data into string
- if (((strstr(truncated2, tempstring)) != 0) && ((strstr(truncated2, tempstring2)) != 0)) {
+ if (((strstr(truncated2, tempstring)) != nullptr) && ((strstr(truncated2, tempstring2)) != nullptr)) {
// start string
pos = strstr(truncated2, tempstring);
statpos = pos - truncated2;
@@ -270,7 +270,7 @@ void GetData(void *param) if (!db_get_s(hContact, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
memset(&temptime, 0, sizeof(temptime));
memset(&tstr, 0, sizeof(tstr));
- ftime = time(NULL);
+ ftime = time(nullptr);
nTime = localtime(&ftime);
// 12 hour
if (db_get_b(hContact, MODULENAME, USE_24_HOUR_KEY, 0) == 0)
@@ -289,7 +289,7 @@ void GetData(void *param) db_get_ws(hContact, "CList", "MyHandle", &dbv);
memset(&temptime, 0, sizeof(temptime));
memset(&tstr, 0, sizeof(tstr));
- ftime = time(NULL);
+ ftime = time(nullptr);
nTime = localtime(&ftime);
// 12 hour
if (db_get_b(hContact, MODULENAME, USE_24_HOUR_KEY, 0) == 0)
@@ -306,7 +306,7 @@ void GetData(void *param) db_free(&dbv);
}
- ftime = time(NULL);
+ ftime = time(nullptr);
nTime = localtime(&ftime);
strncpy_s(timeprefix, _countof(timeprefix), Translate("Last updated on"), _TRUNCATE);
@@ -340,14 +340,14 @@ void GetData(void *param) }
// putting data into string
- if (((strstr(buff, Alerttempstring)) != 0) && ((strstr(buff, Alerttempstring2)) != 0)) {
+ if (((strstr(buff, Alerttempstring)) != nullptr) && ((strstr(buff, Alerttempstring2)) != nullptr)) {
location = (strstr(buff, Alerttempstring)) - buff;
location2 = (strstr(buff, Alerttempstring2)) - buff;
}
}
}
- if ((((strstr(truncated2, tempstring)) != 0) && ((strstr(truncated2, tempstring2)) != 0) && (db_get_b(hContact, MODULENAME, U_ALLSITE_KEY, 0) == 0)) || (db_get_b(hContact, MODULENAME, U_ALLSITE_KEY, 0) == 1)) {
+ if ((((strstr(truncated2, tempstring)) != nullptr) && ((strstr(truncated2, tempstring2)) != nullptr) && (db_get_b(hContact, MODULENAME, U_ALLSITE_KEY, 0) == 0)) || (db_get_b(hContact, MODULENAME, U_ALLSITE_KEY, 0) == 1)) {
RemoveTabs(truncated);
if ( db_get_b(hContact, MODULENAME, CLEAR_DISPLAY_KEY, 0)) {
|