From 98b431843b67a46cab486128111ca89856273b1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sun, 20 Dec 2015 05:42:20 +0000 Subject: Steam: Use std::tstring instead of std::wstring git-svn-id: http://svn.miranda-ng.org/main/trunk@15909 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Steam/src/stdafx.h | 11 ++++++----- protocols/Steam/src/steam_contacts.cpp | 22 +++++++++++----------- 2 files changed, 17 insertions(+), 16 deletions(-) (limited to 'protocols/Steam') diff --git a/protocols/Steam/src/stdafx.h b/protocols/Steam/src/stdafx.h index 992b168ccb..da39bcaed8 100644 --- a/protocols/Steam/src/stdafx.h +++ b/protocols/Steam/src/stdafx.h @@ -6,6 +6,11 @@ #include #include +#include +#include +#include +#include + #include #include #include @@ -30,11 +35,7 @@ #include #include #include - -#include -#include -#include -#include +#include #include "resource.h" #include "version.h" diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index 9126b9f0ac..69572b2953 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -110,18 +110,18 @@ void CSteamProto::UpdateContact(MCONTACT hContact, JSONNode *data) node = json_get(data, "realname"); if (node != NULL) { - std::wstring realname = (TCHAR*)ptrT(json_as_string(node)); + std::tstring realname = (TCHAR*)ptrT(json_as_string(node)); if (!realname.empty()) { size_t pos = realname.find(L' ', 1); - if (pos != std::wstring::npos) + if (pos != std::tstring::npos) { - setWString(hContact, "FirstName", realname.substr(0, pos).c_str()); - setWString(hContact, "LastName", realname.substr(pos + 1).c_str()); + setTString(hContact, "FirstName", realname.substr(0, pos).c_str()); + setTString(hContact, "LastName", realname.substr(pos + 1).c_str()); } else { - setWString(hContact, "FirstName", realname.c_str()); + setTString(hContact, "FirstName", realname.c_str()); delSetting(hContact, "LastName"); } } @@ -315,7 +315,7 @@ MCONTACT CSteamProto::AddContact(const char *steamId, bool isTemporary) // move to default group DBVARIANT dbv; - if (!getWString("DefaultGroup", &dbv)) + if (!getTString("DefaultGroup", &dbv)) { if(Clist_GroupExists(dbv.ptszVal)) db_set_ts(hContact, "CList", "Group", dbv.ptszVal); @@ -742,17 +742,17 @@ void CSteamProto::OnSearchResults(const HttpResponse *response, void *arg) node = json_get(child, "realname"); if (node != NULL) { - std::wstring realname = (TCHAR*)ptrT(json_as_string(node)); + std::tstring realname = (TCHAR*)ptrT(json_as_string(node)); if (!realname.empty()) { size_t pos = realname.find(' ', 1); - if (pos != std::wstring::npos) + if (pos != std::tstring::npos) { - ssr.hdr.firstName.t = mir_wstrdup(realname.substr(0, pos).c_str()); - ssr.hdr.lastName.t = mir_wstrdup(realname.substr(pos + 1).c_str()); + ssr.hdr.firstName.t = mir_tstrdup(realname.substr(0, pos).c_str()); + ssr.hdr.lastName.t = mir_tstrdup(realname.substr(pos + 1).c_str()); } else - ssr.hdr.firstName.t = mir_wstrdup(realname.c_str()); + ssr.hdr.firstName.t = mir_tstrdup(realname.c_str()); } } -- cgit v1.2.3