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 /protocols/Gadu-Gadu/src/keepalive.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'protocols/Gadu-Gadu/src/keepalive.cpp')
-rw-r--r-- | protocols/Gadu-Gadu/src/keepalive.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/Gadu-Gadu/src/keepalive.cpp b/protocols/Gadu-Gadu/src/keepalive.cpp index f55a224cb6..426f72d0f0 100644 --- a/protocols/Gadu-Gadu/src/keepalive.cpp +++ b/protocols/Gadu-Gadu/src/keepalive.cpp @@ -24,7 +24,7 @@ * does not get full pointer but just 2 byte lower bytes.
*/
#define MAX_TIMERS 8
-GGPROTO *g_timers[MAX_TIMERS] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
+GGPROTO *g_timers[MAX_TIMERS] = {nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr};
static VOID CALLBACK gg_keepalive(HWND, UINT, UINT_PTR idEvent, DWORD)
{
@@ -55,13 +55,13 @@ void GGPROTO::keepalive_init() if (getByte(GG_KEY_KEEPALIVE, GG_KEYDEF_KEEPALIVE))
{
int i;
- for(i = 0; i < MAX_TIMERS && g_timers[i] != NULL; i++);
+ for(i = 0; i < MAX_TIMERS && g_timers[i] != nullptr; i++);
if (i < MAX_TIMERS)
{
#ifdef DEBUGMODE
debugLogA("keepalive_init(): Initializing Timer %d", i);
#endif
- timer = SetTimer(NULL, 0, 1000 * 30, gg_keepalive);
+ timer = SetTimer(nullptr, 0, 1000 * 30, gg_keepalive);
g_timers[i] = this;
}
}
@@ -75,10 +75,10 @@ void GGPROTO::keepalive_destroy() if (timer)
{
int i;
- KillTimer(NULL, timer);
+ KillTimer(nullptr, timer);
for(i = 0; i < MAX_TIMERS; i++)
if (g_timers[i] == this) {
- g_timers[i] = NULL;
+ g_timers[i] = nullptr;
break;
}
timer = 0;
|