summaryrefslogtreecommitdiff
path: root/protocols/Steam
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-07-24 20:58:51 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-07-24 20:58:58 +0300
commited4897b7ef69e862806a8c07f1fd475262d0c36e (patch)
tree414efc6365f455122956eac74b754505c8efaf15 /protocols/Steam
parent99893bf3aec9f4e9f0c4844c0987d129e1778c7e (diff)
massive warning fix
Diffstat (limited to 'protocols/Steam')
-rw-r--r--protocols/Steam/src/steam_avatars.cpp4
-rw-r--r--protocols/Steam/src/steam_contacts.cpp20
-rw-r--r--protocols/Steam/src/steam_messages.cpp2
3 files changed, 13 insertions, 13 deletions
diff --git a/protocols/Steam/src/steam_avatars.cpp b/protocols/Steam/src/steam_avatars.cpp
index 828840de94..d01c3b0358 100644
--- a/protocols/Steam/src/steam_avatars.cpp
+++ b/protocols/Steam/src/steam_avatars.cpp
@@ -3,7 +3,7 @@
wchar_t* CSteamProto::GetAvatarFilePath(MCONTACT hContact)
{
wchar_t path[MAX_PATH];
- mir_snwprintf(path, L"%s\\%S", VARSW(L"%miranda_avatarcache%"), m_szModuleName);
+ mir_snwprintf(path, L"%s\\%S", VARSW(L"%miranda_avatarcache%").get(), m_szModuleName);
DWORD dwAttributes = GetFileAttributes(path);
if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
@@ -11,7 +11,7 @@ wchar_t* CSteamProto::GetAvatarFilePath(MCONTACT hContact)
ptrA steamId(getStringA(hContact, "SteamID"));
if (steamId != NULL)
- mir_snwprintf(path, MAX_PATH, L"%s\\%s.jpg", path, _A2T(steamId));
+ mir_snwprintf(path, MAX_PATH, L"%s\\%S.jpg", path, steamId.get());
else
return nullptr;
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp
index 63e4c05905..cd576ac374 100644
--- a/protocols/Steam/src/steam_contacts.cpp
+++ b/protocols/Steam/src/steam_contacts.cpp
@@ -278,7 +278,7 @@ void CSteamProto::ContactIsRemoved(MCONTACT hContact)
ptrW nick(getWStringA(hContact, "Nick"));
wchar_t message[MAX_PATH];
- mir_snwprintf(message, MAX_PATH, TranslateT("%s has been removed from your contact list"), nick);
+ mir_snwprintf(message, MAX_PATH, TranslateT("%s has been removed from your contact list"), nick.get());
ShowNotification(message);
}
@@ -311,7 +311,7 @@ void CSteamProto::ContactIsAskingAuth(MCONTACT hContact)
lastName = mir_strdup("");
char reason[MAX_PATH];
- mir_snprintf(reason, Translate("%s has added you to contact list"), nickName);
+ mir_snprintf(reason, Translate("%s has added you to contact list"), nickName.get());
DB_AUTH_BLOB blob(hContact, nickName, firstName, lastName, steamId, reason);
@@ -486,7 +486,7 @@ void CSteamProto::OnGotAvatar(const HttpResponse &response, void *arg)
if (!response.IsSuccess()) {
ptrA steamId(getStringA(ai.hContact, "SteamID"));
- debugLogA(__FUNCTION__ ": failed to get avatar %s", steamId);
+ debugLogA(__FUNCTION__ ": failed to get avatar %s", steamId.get());
if (ai.hContact)
ProtoBroadcastAck(ai.hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)& ai, 0);
@@ -517,7 +517,7 @@ void CSteamProto::OnFriendAdded(const HttpResponse &response, void *arg)
who = mir_wstrdup(steamId);
wchar_t message[MAX_PATH];
- mir_snwprintf(message, L"Error adding friend %s", who);
+ mir_snwprintf(message, L"Error adding friend %s", who.get());
JSONNode root = JSONNode::parse(response.Content);
if (root) {
@@ -531,19 +531,19 @@ void CSteamProto::OnFriendAdded(const HttpResponse &response, void *arg)
int errorCode = errors[first].as_int();
switch (errorCode) {
case 11:
- mir_snwprintf(message, L"All communication with %s is blocked. Communication is only possible if you have lifted the blocking. To do this, visit the user's Steam Community page.", who);
+ mir_snwprintf(message, L"All communication with %s is blocked. Communication is only possible if you have lifted the blocking. To do this, visit the user's Steam Community page.", who.get());
break;
case 15:
- mir_snwprintf(message, L"Request to %s can not be sent. His/her friends list is full.", who);
+ mir_snwprintf(message, L"Request to %s can not be sent. His/her friends list is full.", who.get());
break;
case 24:
mir_wstrcpy(message, L"Your account does not meet the requirements to use this feature. Visit Steam Support to get more information.");
break;
case 25:
- mir_snwprintf(message, L"Request to %s can not be sent. Your friends list is full.", who);
+ mir_snwprintf(message, L"Request to %s can not be sent. Your friends list is full.", who.get());
break;
case 40:
- mir_snwprintf(message, L"Error adding friend %s. The communication between you and the other Steam member is blocked.", who);
+ mir_snwprintf(message, L"Error adding friend %s. The communication between you and the other Steam member is blocked.", who.get());
break;
case 84:
mir_wstrcpy(message, L"You've been sending too many invitations lately. Please try again in a day or two.");
@@ -634,7 +634,7 @@ void CSteamProto::OnPendingApproved(const JSONNode &root, void *arg)
int success = root["success"].as_int();
if (success == 0) {
json_string error = root["error_text"].as_string();
- debugLogA(__FUNCTION__ ": failed to approve pending from %s (%s)", steamId, ptrA(mir_utf8decodeA(error.c_str())));
+ debugLogA(__FUNCTION__ ": failed to approve pending from %s (%s)", steamId.get(), ptrA(mir_utf8decodeA(error.c_str())).get());
}
}
@@ -648,7 +648,7 @@ void CSteamProto::OnPendingIgnoreded(const JSONNode &root, void *arg)
int success = root["success"].as_int();
if (success == 0) {
json_string error = root["error_text"].as_string();
- debugLogA(__FUNCTION__ ": failed to ignore pending from %s (%s)", steamId, ptrA(mir_utf8decodeA(error.c_str())));
+ debugLogA(__FUNCTION__ ": failed to ignore pending from %s (%s)", steamId.get(), ptrA(mir_utf8decodeA(error.c_str())).get());
}
}
diff --git a/protocols/Steam/src/steam_messages.cpp b/protocols/Steam/src/steam_messages.cpp
index d06eb54de2..b9b37914a3 100644
--- a/protocols/Steam/src/steam_messages.cpp
+++ b/protocols/Steam/src/steam_messages.cpp
@@ -44,7 +44,7 @@ void CSteamProto::OnMessageSent(const HttpResponse &response, void *arg)
}
if (mir_strcmpi(error.c_str(), "OK") != 0) {
- debugLogA(__FUNCTION__ ": failed to send message for %s (%s)", steamId, error.c_str());
+ debugLogA(__FUNCTION__ ": failed to send message for %s (%s)", steamId.get(), error.c_str());
ProtoBroadcastAck(param->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, param->hMessage, _A2T(error.c_str()));
}
else {