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/FacebookRM/src/json.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'protocols/FacebookRM/src/json.cpp')
-rw-r--r-- | protocols/FacebookRM/src/json.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp index 94791a1324..165436cb1b 100644 --- a/protocols/FacebookRM/src/json.cpp +++ b/protocols/FacebookRM/src/json.cpp @@ -762,13 +762,13 @@ int facebook_json_parser::parse_messages(std::string *pData, std::vector<faceboo // Notify it, if user wants to be notified if (proto->getByte(FACEBOOK_KEY_EVENT_FRIENDSHIP_ENABLE, DEFAULT_EVENT_FRIENDSHIP_ENABLE)) { - proto->NotifyEvent(proto->m_tszUserName, ptrW(mir_utf8decodeW(text.c_str())), NULL, EVENT_FRIENDSHIP, &url, alert_id.empty() ? NULL : &alert_id); + proto->NotifyEvent(proto->m_tszUserName, ptrW(mir_utf8decodeW(text.c_str())), NULL, EVENT_FRIENDSHIP, &url, alert_id.empty() ? nullptr : &alert_id); } } } else if (t == "jewel_requests_add") { // New friendship request, load them all with real names (because there is only user_id in "from" field) - proto->ForkThread(&FacebookProto::ProcessFriendRequests, NULL); + proto->ForkThread(&FacebookProto::ProcessFriendRequests, nullptr); } /*else if (t == "jewel_requests_handled") { // revised 5.3.2017 // When some request is approved (or perhaps even ignored/removed) @@ -870,7 +870,7 @@ int facebook_json_parser::parse_messages(std::string *pData, std::vector<faceboo if (!buddyList) continue; - time_t offlineThreshold = time(NULL) - 15 * 60; // contacts last active more than 15 minutes will be marked offline + time_t offlineThreshold = time(nullptr) - 15 * 60; // contacts last active more than 15 minutes will be marked offline for (auto itNodes = buddyList.begin(); itNodes != buddyList.end(); ++itNodes) { std::string id = (*itNodes).name(); @@ -944,7 +944,7 @@ int facebook_json_parser::parse_messages(std::string *pData, std::vector<faceboo if (!overlay_) continue; - time_t offlineThreshold = time(NULL) - 15 * 60; // contacts last active more than 15 minutes will be marked offline + time_t offlineThreshold = time(nullptr) - 15 * 60; // contacts last active more than 15 minutes will be marked offline for (auto itNodes = overlay_.begin(); itNodes != overlay_.end(); ++itNodes) { std::string id = (*itNodes).name(); @@ -1070,7 +1070,7 @@ int facebook_json_parser::parse_messages(std::string *pData, std::vector<faceboo auto itAlert = notifications->find(id); if (itAlert != notifications->end()) { - if (itAlert->second->hWndPopup != NULL) + if (itAlert->second->hWndPopup != nullptr) PUDeletePopup(itAlert->second->hWndPopup); // close popup delete itAlert->second; |