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/Dummy | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'protocols/Dummy')
-rw-r--r-- | protocols/Dummy/src/dummy_proto.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/Dummy/src/dummy_proto.cpp b/protocols/Dummy/src/dummy_proto.cpp index 56a4d3b8b8..6ccf2f4ac0 100644 --- a/protocols/Dummy/src/dummy_proto.cpp +++ b/protocols/Dummy/src/dummy_proto.cpp @@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. void CDummyProto::SendMsgAck(void *p) { - if (p == NULL) + if (p == nullptr) return; message_data *data = static_cast<message_data*>(p); @@ -69,7 +69,7 @@ CDummyProto::CDummyProto(const char *szModuleName, const wchar_t *ptszUserName) CDummyProto::~CDummyProto() { - Netlib_CloseHandle(m_hNetlibUser); m_hNetlibUser = NULL; + Netlib_CloseHandle(m_hNetlibUser); m_hNetlibUser = nullptr; dummy_Instances.remove(this); } @@ -145,7 +145,7 @@ int CDummyProto::SetStatus(int) HANDLE CDummyProto::SearchBasic(const wchar_t* id) { if (uniqueIdSetting[0] == '\0') - return 0; + return nullptr; wchar_t *tid = mir_wstrdup(id); ForkThread(&CDummyProto::SearchIdAckThread, tid); @@ -154,7 +154,7 @@ HANDLE CDummyProto::SearchBasic(const wchar_t* id) MCONTACT CDummyProto::AddToList(int flags, PROTOSEARCHRESULT* psr) { - if (psr->id.w == NULL) + if (psr->id.w == nullptr) return NULL; MCONTACT hContact = db_add_contact(); |