summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src/icq_directmsg.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/IcqOscarJ/src/icq_directmsg.cpp
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'protocols/IcqOscarJ/src/icq_directmsg.cpp')
-rw-r--r--protocols/IcqOscarJ/src/icq_directmsg.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/IcqOscarJ/src/icq_directmsg.cpp b/protocols/IcqOscarJ/src/icq_directmsg.cpp
index 65eb850e15..9d4afa4238 100644
--- a/protocols/IcqOscarJ/src/icq_directmsg.cpp
+++ b/protocols/IcqOscarJ/src/icq_directmsg.cpp
@@ -33,7 +33,7 @@ void CIcqProto::handleDirectMessage(directconnect* dc, PBYTE buf, size_t wLen)
WORD wStatus;
WORD wFlags;
WORD wTextLen;
- char* pszText = NULL;
+ char* pszText = nullptr;
// The first part of the packet should always be at least 31 bytes
if (wLen < 31) {
@@ -136,7 +136,7 @@ void CIcqProto::handleDirectMessage(directconnect* dc, PBYTE buf, size_t wLen)
pMsgAck.wCookie = wCookie;
pMsgAck.msgType = bMsgType;
pMsgAck.bFlags = bMsgFlags;
- handleMessageTypes(dc->dwRemoteUin, szUID, time(NULL), 0, 0, wCookie, dc->wVersion, (int)bMsgType, (int)bMsgFlags, 0, (DWORD)wLen, wTextLen, (char*)buf, MTF_DIRECT, &pMsgAck);
+ handleMessageTypes(dc->dwRemoteUin, szUID, time(nullptr), 0, 0, wCookie, dc->wVersion, (int)bMsgType, (int)bMsgFlags, 0, (DWORD)wLen, wTextLen, (char*)buf, MTF_DIRECT, &pMsgAck);
break;
}
}
@@ -148,11 +148,11 @@ void CIcqProto::handleDirectMessage(directconnect* dc, PBYTE buf, size_t wLen)
buf -= wTextLen;
wLen += wTextLen;
- handleMessageTypes(dc->dwRemoteUin, szUID, time(NULL), 0, 0, wCookie, dc->wVersion, (int)bMsgType, (int)bMsgFlags, 2, (DWORD)wLen, wTextLen, (char*)buf, MTF_DIRECT, NULL);
+ handleMessageTypes(dc->dwRemoteUin, szUID, time(nullptr), 0, 0, wCookie, dc->wVersion, (int)bMsgType, (int)bMsgFlags, 2, (DWORD)wLen, wTextLen, (char*)buf, MTF_DIRECT, nullptr);
}
else {
MCONTACT hCookieContact;
- cookie_message_data *pCookieData = NULL;
+ cookie_message_data *pCookieData = nullptr;
if (!FindCookie(wCookie, &hCookieContact, (void**)&pCookieData))
NetLog_Direct("Received an unexpected direct ack");
else if (hCookieContact != dc->hContact) {
@@ -251,7 +251,7 @@ void CIcqProto::handleDirectGreetingMessage(directconnect* dc, PBYTE buf, size_t
pMsgAck.pDC = dc;
pMsgAck.wCookie = wCookie;
pMsgAck.msgType = typeId;
- handleMessageTypes(dc->dwRemoteUin, szUID, time(NULL), 0, 0, wCookie, dc->wVersion, typeId, 0, 0, dwLengthToEnd, dwDataLength, (char*)buf, MTF_PLUGIN | MTF_DIRECT, &pMsgAck);
+ handleMessageTypes(dc->dwRemoteUin, szUID, time(nullptr), 0, 0, wCookie, dc->wVersion, typeId, 0, 0, dwLengthToEnd, dwDataLength, (char*)buf, MTF_PLUGIN | MTF_DIRECT, &pMsgAck);
}
else if (typeId == MTYPE_STATUSMSGEXT && wCommand == DIRECT_ACK) { // especially for icq2003b
NetLog_Direct("This is extended status reply");
@@ -261,11 +261,11 @@ void CIcqProto::handleDirectGreetingMessage(directconnect* dc, PBYTE buf, size_t
szMsg[dwDataLength] = '\0';
uid_str szUID;
- handleMessageTypes(dc->dwRemoteUin, szUID, time(NULL), 0, 0, wCookie, dc->wVersion, (int)(qt + 0xE7), 3, 2, wLen, dwDataLength, szMsg, MTF_PLUGIN | MTF_DIRECT, NULL);
+ handleMessageTypes(dc->dwRemoteUin, szUID, time(nullptr), 0, 0, wCookie, dc->wVersion, (int)(qt + 0xE7), 3, 2, wLen, dwDataLength, szMsg, MTF_PLUGIN | MTF_DIRECT, nullptr);
}
else if (typeId && wCommand == DIRECT_ACK) {
MCONTACT hCookieContact;
- cookie_message_data *pCookieData = NULL;
+ cookie_message_data *pCookieData = nullptr;
if (!FindCookie(wCookie, &hCookieContact, (void**)&pCookieData)) {
NetLog_Direct("Received an unexpected direct ack");