summaryrefslogtreecommitdiff
path: root/protocols/ICQCorp/src/services.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/ICQCorp/src/services.cpp
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'protocols/ICQCorp/src/services.cpp')
-rw-r--r--protocols/ICQCorp/src/services.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/protocols/ICQCorp/src/services.cpp b/protocols/ICQCorp/src/services.cpp
index c9a3442b65..d182c0bc33 100644
--- a/protocols/ICQCorp/src/services.cpp
+++ b/protocols/ICQCorp/src/services.cpp
@@ -164,7 +164,7 @@ static INT_PTR icqGetInfo(WPARAM, LPARAM lParam)
CCSDATA *ccs = (CCSDATA *)lParam;
ICQUser *u = icq.getUserByContact(ccs->hContact);
- if (u == NULL || icq.statusVal <= ID_STATUS_OFFLINE)
+ if (u == nullptr || icq.statusVal <= ID_STATUS_OFFLINE)
return 1;
icq.getUserInfo(u, ccs->wParam & SGIF_MINIMAL);
@@ -180,7 +180,7 @@ static INT_PTR icqSendMessage(WPARAM, LPARAM lParam)
CCSDATA *ccs = (CCSDATA *)lParam;
ICQUser *u = icq.getUserByContact(ccs->hContact);
// uin = db_get_dw(ccs->hContact, ICQCORP_PROTONAME, "UIN", 0);
- if (u == NULL || icq.statusVal <= ID_STATUS_OFFLINE)
+ if (u == nullptr || icq.statusVal <= ID_STATUS_OFFLINE)
return 0;
ICQEvent *icqEvent = icq.sendMessage(u, ptrA(mir_utf8decodeA((char*)ccs->lParam)));
@@ -220,7 +220,7 @@ static INT_PTR icqSendUrl(WPARAM, LPARAM lParam)
T("[ ] send url\n");
u = icq.getUserByContact(ccs->hContact);
- if (u == NULL || icq.statusVal <= ID_STATUS_OFFLINE)
+ if (u == nullptr || icq.statusVal <= ID_STATUS_OFFLINE)
return 0;
icqEvent = icq.sendUrl(u, (char*)ccs->lParam);
@@ -277,7 +277,7 @@ static INT_PTR icqGetAwayMsg(WPARAM, LPARAM lParam)
T("[ ] send get away msg\n");
u = icq.getUserByContact(ccs->hContact);
- if (u == NULL || u->statusVal <= ID_STATUS_ONLINE) return 0;
+ if (u == nullptr || u->statusVal <= ID_STATUS_ONLINE) return 0;
icqEvent = icq.sendReadAwayMsg(u);
return icqEvent ? icqEvent->sequence : 0;
@@ -308,7 +308,7 @@ static INT_PTR icqSendFile(WPARAM, LPARAM lParam)
T("[ ] send file\n");
u = icq.getUserByContact(ccs->hContact);
- if (u == NULL || u->statusVal == ID_STATUS_OFFLINE || icq.statusVal <= ID_STATUS_OFFLINE) return 0;
+ if (u == nullptr || u->statusVal == ID_STATUS_OFFLINE || icq.statusVal <= ID_STATUS_OFFLINE) return 0;
unsigned long filesCount, directoriesCount, filesSize = 0;
char filename[MAX_PATH], format[32];
@@ -347,7 +347,7 @@ static INT_PTR icqFileAllow(WPARAM, LPARAM lParam)
T("[ ] send accept file request\n");
u = icq.getUserByContact(ccs->hContact);
- if (u == NULL || u->statusVal == ID_STATUS_OFFLINE) return 0;
+ if (u == nullptr || u->statusVal == ID_STATUS_OFFLINE) return 0;
t->path = _strdup((char*)ccs->lParam);
@@ -366,7 +366,7 @@ static INT_PTR icqFileDeny(WPARAM, LPARAM lParam)
T("[ ] send refuse file request\n");
u = icq.getUserByContact(ccs->hContact);
- if (u == NULL || u->statusVal == ID_STATUS_OFFLINE) return 0;
+ if (u == nullptr || u->statusVal == ID_STATUS_OFFLINE) return 0;
icq.refuseFile(u, t->sequence, (char*)ccs->lParam);
@@ -393,7 +393,7 @@ static INT_PTR icqFileCancel(WPARAM, LPARAM lParam)
T("[ ] file cancel\n");
u = icq.getUserByContact(ccs->hContact);
- if (u == NULL || u->statusVal == ID_STATUS_OFFLINE) return 0;
+ if (u == nullptr || u->statusVal == ID_STATUS_OFFLINE) return 0;
// icq.refuseFile(u, t->sequence, (char*)ccs->lParam);
@@ -485,7 +485,7 @@ static int icqContactDeleted(WPARAM wParam, LPARAM)
T("[ ] contact deleted\n");
- if ((u = icq.getUserByContact((MCONTACT)wParam)) != NULL) icq.removeUser(u);
+ if ((u = icq.getUserByContact((MCONTACT)wParam)) != nullptr) icq.removeUser(u);
return 0;
}