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/Steam/src/steam_proto.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'protocols/Steam/src/steam_proto.cpp')
-rw-r--r-- | protocols/Steam/src/steam_proto.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index 5ea69328b8..e5fd1b3b89 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -9,9 +9,9 @@ CSteamProto::CSteamProto(const char* protoName, const wchar_t* userName) m_idleTS = 0; m_lastMessageTS = 0; isLoginAgain = false; - m_hQueueThread = NULL; - m_pollingConnection = NULL; - m_hPollingThread = NULL; + m_hQueueThread = nullptr; + m_pollingConnection = nullptr; + m_hPollingThread = nullptr; // icons wchar_t filePath[MAX_PATH]; @@ -23,7 +23,7 @@ CSteamProto::CSteamProto(const char* protoName, const wchar_t* userName) char settingName[100]; mir_snprintf(settingName, "%s_%s", MODULE, "main"); - SKINICONDESC sid = { 0 }; + SKINICONDESC sid = {}; sid.flags = SIDF_ALL_UNICODE; sid.defaultFile.w = filePath; sid.pszName = settingName; @@ -225,7 +225,7 @@ DWORD_PTR CSteamProto:: GetCaps(int type, MCONTACT) HANDLE CSteamProto::SearchBasic(const wchar_t* id) { if (!this->IsOnline()) - return 0; + return nullptr; ptrA token(getStringA("TokenSecret")); ptrA steamId(mir_u2a(id)); @@ -241,7 +241,7 @@ HANDLE CSteamProto::SearchBasic(const wchar_t* id) HANDLE CSteamProto::SearchByName(const wchar_t* nick, const wchar_t* firstName, const wchar_t* lastName) { if (!this->IsOnline()) - return 0; + return nullptr; // Combine all fields to single text wchar_t keywordsT[200]; @@ -262,7 +262,7 @@ int CSteamProto::SendMsg(MCONTACT hContact, int, const char *message) { if (!IsOnline()) { - ProtoBroadcastAck(hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, NULL, (LPARAM)Translate("You cannot send messages when you are offline.")); + ProtoBroadcastAck(hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, nullptr, (LPARAM)Translate("You cannot send messages when you are offline.")); return 0; } |