From 1c0172cca4f1e90679321912e20436a7f42f122d Mon Sep 17 00:00:00 2001 From: Goraf <22941576+Goraf@users.noreply.github.com> Date: Sat, 24 Feb 2018 15:32:06 +0100 Subject: more nullptr --- protocols/Tox/src/http_request.h | 12 ++++++------ protocols/Tox/src/tox_profile.cpp | 2 +- protocols/Tox/src/tox_proto.h | 2 +- protocols/Tox/src/tox_thread.h | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'protocols/Tox/src') diff --git a/protocols/Tox/src/http_request.h b/protocols/Tox/src/http_request.h index 18b8228f63..d51aab289f 100644 --- a/protocols/Tox/src/http_request.h +++ b/protocols/Tox/src/http_request.h @@ -27,14 +27,14 @@ private: cbSize = sizeof(NETLIBHTTPREQUEST); requestType = type; flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_NODUMPSEND | NLHRF_DUMPASTEXT; - szUrl = NULL; - headers = NULL; + szUrl = nullptr; + headers = nullptr; headersCount = 0; - pData = NULL; + pData = nullptr; dataLength = 0; resultCode = 0; - szResultDescr = NULL; - nlc = NULL; + szResultDescr = nullptr; + nlc = nullptr; timeout = 0; } @@ -90,7 +90,7 @@ public: void SetData(const char *data, size_t size) { - if (pData != NULL) + if (pData != nullptr) mir_free(pData); dataLength = (int)size; diff --git a/protocols/Tox/src/tox_profile.cpp b/protocols/Tox/src/tox_profile.cpp index 77f9285050..a5ced0c8f9 100644 --- a/protocols/Tox/src/tox_profile.cpp +++ b/protocols/Tox/src/tox_profile.cpp @@ -184,7 +184,7 @@ INT_PTR CToxProto::OnChangePassword(WPARAM, LPARAM) INT_PTR CToxProto::OnRemovePassword(WPARAM, LPARAM) { const wchar_t *message = TranslateT("Removing the password will lead to decryption of the profile.\r\nAre you sure to remove password?"); - int result = MessageBox(NULL, message, TranslateT("Remove password"), MB_YESNO | MB_ICONQUESTION); + int result = MessageBox(nullptr, message, TranslateT("Remove password"), MB_YESNO | MB_ICONQUESTION); if (result == IDYES) { delSetting(TOX_SETTINGS_PASSWORD); SaveToxProfile(m_toxThread->Tox()); diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h index cfbee1b4ec..3971d76a72 100644 --- a/protocols/Tox/src/tox_proto.h +++ b/protocols/Tox/src/tox_proto.h @@ -161,7 +161,7 @@ private: ToxHexAddress GetContactPublicKey(const Tox *tox, const int friendNumber); - MCONTACT AddContact(const char *address, const char *nick = NULL, const char *dnsId = NULL, bool isTemporary = false); + MCONTACT AddContact(const char *address, const char *nick = nullptr, const char *dnsId = nullptr, bool isTemporary = false); MCONTACT GetContactFromAuthEvent(MEVENT hEvent); diff --git a/protocols/Tox/src/tox_thread.h b/protocols/Tox/src/tox_thread.h index 37372177dc..d47138822e 100644 --- a/protocols/Tox/src/tox_thread.h +++ b/protocols/Tox/src/tox_thread.h @@ -7,8 +7,8 @@ private: Tox *tox; public: - CToxThread(Tox_Options *options, TOX_ERR_NEW *error = NULL) - : tox(NULL) + CToxThread(Tox_Options *options, TOX_ERR_NEW *error = nullptr) + : tox(nullptr) { tox = tox_new(options, error); } @@ -19,7 +19,7 @@ public: if (tox) { tox_kill(tox); - tox = NULL; + tox = nullptr; } } -- cgit v1.2.3