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/messages.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'protocols/FacebookRM/src/messages.cpp')
-rw-r--r-- | protocols/FacebookRM/src/messages.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp index 8054934261..48b86f3981 100644 --- a/protocols/FacebookRM/src/messages.cpp +++ b/protocols/FacebookRM/src/messages.cpp @@ -31,7 +31,7 @@ int FacebookProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT *pre) void FacebookProto::SendMsgWorker(void *p) { - if (p == NULL) + if (p == nullptr) return; send_direct *data = static_cast<send_direct*>(p); @@ -69,7 +69,7 @@ void FacebookProto::SendMsgWorker(void *p) void FacebookProto::SendChatMsgWorker(void *p) { - if (p == NULL) + if (p == nullptr) return; send_chat *data = static_cast<send_chat*>(p); @@ -101,7 +101,7 @@ void FacebookProto::SendChatMsgWorker(void *p) UpdateChat(data->chat_id.c_str(), facy.self_.user_id.c_str(), facy.self_.real_name.c_str(), data->msg.c_str()); else { ptrA text(mir_utf8encode(err_message.c_str())); - UpdateChat(data->chat_id.c_str(), NULL, NULL, text); + UpdateChat(data->chat_id.c_str(), nullptr, nullptr, text); } } } @@ -128,7 +128,7 @@ int FacebookProto::UserIsTyping(MCONTACT hContact, int type) void FacebookProto::SendTypingWorker(void *p) { - if (p == NULL) + if (p == nullptr) return; send_typing *typing = static_cast<send_typing*>(p); @@ -159,7 +159,7 @@ void FacebookProto::SendTypingWorker(void *p) void FacebookProto::ReadMessageWorker(void *p) { - if (p == NULL) + if (p == nullptr) return; if (getBool(FACEBOOK_KEY_KEEP_UNREAD, 0)) @@ -215,7 +215,7 @@ void FacebookProto::StickerAsSmiley(std::string sticker, const std::string &url, // Check if we have this sticker already and download it if not if (GetFileAttributes(filename.c_str()) == INVALID_FILE_ATTRIBUTES) { - HNETLIBCONN nlc = NULL; + HNETLIBCONN nlc = nullptr; facy.save_url(url, filename, nlc); Netlib_CloseHandle(nlc); } |