From a7c24ca48995cf2bf436156302f96b91bf135409 Mon Sep 17 00:00:00 2001 From: Goraf <22941576+Goraf@users.noreply.github.com> Date: Mon, 13 Nov 2017 15:03:31 +0100 Subject: Code modernize ... * replace 0/NULL with nullptr [using clang-tidy] --- protocols/WhatsApp/src/messages.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'protocols/WhatsApp/src/messages.cpp') 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()); -- cgit v1.2.3