summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu/src/gg_proto.cpp
diff options
context:
space:
mode:
authorGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:03:31 +0100
committerGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:07:33 +0100
commita7c24ca48995cf2bf436156302f96b91bf135409 (patch)
tree953835509ff1b778833e78fd7b74b05e05e77c84 /protocols/Gadu-Gadu/src/gg_proto.cpp
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'protocols/Gadu-Gadu/src/gg_proto.cpp')
-rw-r--r--protocols/Gadu-Gadu/src/gg_proto.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp
index 3fe2a9d605..d0ff63102f 100644
--- a/protocols/Gadu-Gadu/src/gg_proto.cpp
+++ b/protocols/Gadu-Gadu/src/gg_proto.cpp
@@ -254,14 +254,14 @@ void __cdecl GGPROTO::searchthread(void *)
HANDLE GGPROTO::SearchBasic(const wchar_t *id)
{
if (!isonline())
- return 0;
+ return nullptr;
gg_pubdir50_t req = gg_pubdir50_new(GG_PUBDIR50_SEARCH);
if (!req) {
#ifdef DEBUGMODE
debugLogA("SearchBasic(): ForkThread 10 GGPROTO::searchthread");
#endif
- ForkThread(&GGPROTO::searchthread, NULL);
+ ForkThread(&GGPROTO::searchthread, nullptr);
return (HANDLE)1;
}
@@ -275,7 +275,7 @@ HANDLE GGPROTO::SearchBasic(const wchar_t *id)
#ifdef DEBUGMODE
debugLogA("SearchBasic(): ForkThread 11 GGPROTO::searchthread");
#endif
- ForkThread(&GGPROTO::searchthread, NULL);
+ ForkThread(&GGPROTO::searchthread, nullptr);
return (HANDLE)1;
}
gg_LeaveCriticalSection(&sess_mutex, "SearchBasic", 50, 2, "sess_mutex", 1);
@@ -292,17 +292,17 @@ HANDLE GGPROTO::SearchByName(const wchar_t *nick, const wchar_t *firstName, cons
{
// Check if connected and if there's a search data
if (!isonline())
- return 0;
+ return nullptr;
if (!nick && !firstName && !lastName)
- return 0;
+ return nullptr;
gg_pubdir50_t req = gg_pubdir50_new(GG_PUBDIR50_SEARCH);
- if (req == NULL) {
+ if (req == nullptr) {
#ifdef DEBUGMODE
debugLogA("SearchByName(): ForkThread 12 GGPROTO::searchthread");
#endif
- ForkThread(&GGPROTO::searchthread, NULL);
+ ForkThread(&GGPROTO::searchthread, nullptr);
return (HANDLE)1;
}
@@ -343,7 +343,7 @@ HANDLE GGPROTO::SearchByName(const wchar_t *nick, const wchar_t *firstName, cons
#ifdef DEBUGMODE
debugLogA("SearchByName(): ForkThread 13 GGPROTO::searchthread");
#endif
- ForkThread(&GGPROTO::searchthread, NULL);
+ ForkThread(&GGPROTO::searchthread, nullptr);
}
else
{
@@ -362,14 +362,14 @@ HWND GGPROTO::SearchAdvanced(HWND hwndDlg)
{
// Check if connected
if (!isonline())
- return 0;
+ return nullptr;
gg_pubdir50_t req = gg_pubdir50_new(GG_PUBDIR50_SEARCH);
if (!req) {
#ifdef DEBUGMODE
debugLogA("SearchAdvanced(): ForkThread 14 GGPROTO::searchthread");
#endif
- ForkThread(&GGPROTO::searchthread, NULL);
+ ForkThread(&GGPROTO::searchthread, nullptr);
return (HWND)1;
}
@@ -413,7 +413,7 @@ HWND GGPROTO::SearchAdvanced(HWND hwndDlg)
if (mir_wstrlen(text)) {
int yearTo = _tstoi(text);
int yearFrom;
- time_t t = time(NULL);
+ time_t t = time(nullptr);
struct tm *lt = localtime(&t);
int ay = lt->tm_year + 1900;
char age[16];
@@ -459,7 +459,7 @@ HWND GGPROTO::SearchAdvanced(HWND hwndDlg)
// No data entered
if (szQuery.GetLength() <= 7 || (szQuery.GetLength() == 8 && IsDlgButtonChecked(hwndDlg, IDC_ONLYCONNECTED))) {
gg_pubdir50_free(req);
- return 0;
+ return nullptr;
}
// Count crc & check if the data was equal if yes do same search with shift
@@ -479,7 +479,7 @@ HWND GGPROTO::SearchAdvanced(HWND hwndDlg)
#ifdef DEBUGMODE
debugLogA("SearchAdvanced(): ForkThread 15 GGPROTO::searchthread");
#endif
- ForkThread(&GGPROTO::searchthread, NULL);
+ ForkThread(&GGPROTO::searchthread, nullptr);
return (HWND)1;
}
gg_LeaveCriticalSection(&sess_mutex, "SearchAdvanced", 52, 2, "sess_mutex", 1);
@@ -663,7 +663,7 @@ int GGPROTO::SetAwayMsg(int iStatus, const wchar_t *newMsg)
else {
if (*msgPtr)
mir_free(*msgPtr);
- *msgPtr = newMsg && *newMsg ? mir_wstrdup(newMsg) : NULL;
+ *msgPtr = newMsg && *newMsg ? mir_wstrdup(newMsg) : nullptr;
#ifdef DEBUGMODE
debugLogA("SetAwayMsg(): Message changed.");
#endif