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/SkypeWeb/src/skype_messages.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'protocols/SkypeWeb/src/skype_messages.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_messages.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp index 4b92e06afe..c7245ca1a2 100644 --- a/protocols/SkypeWeb/src/skype_messages.cpp +++ b/protocols/SkypeWeb/src/skype_messages.cpp @@ -52,7 +52,7 @@ int CSkypeProto::OnSendMessage(MCONTACT hContact, int, const char *szMessage) SendMessageParam *param = new SendMessageParam();
param->hContact = hContact;
- param->hMessage = time(NULL);
+ param->hMessage = time(nullptr);
ptrA username(getStringA(hContact, "Skypename"));
@@ -75,10 +75,10 @@ void CSkypeProto::OnMessageSent(const NETLIBHTTPREQUEST *response, void *arg) HANDLE hMessage = (HANDLE)param->hMessage;
delete param;
- if (response != NULL) {
+ if (response != nullptr) {
if (response->resultCode == 201) {
if (m_OutMessages.getIndex(hMessage) != -1) {
- if (response->pData != NULL) {
+ if (response->pData != nullptr) {
JSONNode jRoot = JSONNode::parse(response->pData);
if (m_mpOutMessages.find(hMessage) == m_mpOutMessages.end()) {
m_mpOutMessages[hMessage] = std::stoull(jRoot["OriginalArrivalTime"].as_string()) / 1000;
@@ -94,7 +94,7 @@ void CSkypeProto::OnMessageSent(const NETLIBHTTPREQUEST *response, void *arg) else {
std::string strError = Translate("Unknown error!");
- if (response->pData != NULL) {
+ if (response->pData != nullptr) {
JSONNode jRoot = JSONNode::parse(response->pData);
const JSONNode &jErr = jRoot["errorCode"];
@@ -245,7 +245,7 @@ void CSkypeProto::MarkMessagesRead(MCONTACT hContact, MEVENT hDbEvent) void CSkypeProto::ProcessContactRecv(MCONTACT hContact, time_t timestamp, const char *szContent, const char *szMessageId)
{
- HXML xmlNode = xmlParseString(mir_utf8decodeW(szContent), 0, L"contacts");
+ HXML xmlNode = xmlParseString(mir_utf8decodeW(szContent), nullptr, L"contacts");
if (xmlNode) {
int nCount = 0;
PROTOSEARCHRESULT **psr;
@@ -256,7 +256,7 @@ void CSkypeProto::ProcessContactRecv(MCONTACT hContact, time_t timestamp, const nCount = 0;
for (int i = 0; i < xmlGetChildCount(xmlNode); i++) {
HXML xmlContact = xmlGetNthChild(xmlNode, L"c", i);
- if (xmlContact != NULL) {
+ if (xmlContact != nullptr) {
const wchar_t *tszContactId = xmlGetAttrValue(xmlContact, L"s");
//const wchar_t *tszContactName = xmlGetAttrValue(xmlContact, L"f");
|