summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/messages.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/WhatsApp/src/messages.cpp
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'protocols/WhatsApp/src/messages.cpp')
-rw-r--r--protocols/WhatsApp/src/messages.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/WhatsApp/src/messages.cpp b/protocols/WhatsApp/src/messages.cpp
index 98bea34363..0d1ebff87e 100644
--- a/protocols/WhatsApp/src/messages.cpp
+++ b/protocols/WhatsApp/src/messages.cpp
@@ -34,7 +34,7 @@ void WhatsAppProto::onMessageForMe(const FMessage &pMsg)
if (getByte(WHATSAPP_KEY_USE_REMOTE_TIME, 0))
recv.timestamp = pMsg.timestamp;
else
- recv.timestamp = time(NULL);
+ recv.timestamp = time(nullptr);
ProtoChainRecvMsg(hContact, &recv);
}
@@ -49,21 +49,21 @@ int WhatsAppProto::SendMsg(MCONTACT hContact, int, const char *msg)
if (jid == NULL)
return 0;
- if (m_pConnection == NULL) {
+ if (m_pConnection == nullptr) {
debugLogA("No connection");
return 0;
}
int msgId = GetSerial();
try {
- time_t now = time(NULL);
+ time_t now = time(nullptr);
std::string id = Utilities::intToStr(now) + "-" + Utilities::intToStr(msgId);
FMessage fmsg(std::string(jid), true, id);
fmsg.timestamp = now;
fmsg.data = msg;
m_pConnection->sendMessage(&fmsg);
- utils::setStatusMessage(hContact, NULL);
+ utils::setStatusMessage(hContact, nullptr);
}
catch (exception &e) {
debugLogA("exception: %s", e.what());