summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2015-12-20 05:42:20 +0000
committerRobert Pösel <robyer@seznam.cz>2015-12-20 05:42:20 +0000
commit98b431843b67a46cab486128111ca89856273b1e (patch)
treeb43ccf6331610a1c7b194f428d84f65210fd61c2 /protocols
parent1440e9da7b83bb649aff90af3cdfe9433416c988 (diff)
Steam: Use std::tstring instead of std::wstring
git-svn-id: http://svn.miranda-ng.org/main/trunk@15909 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Steam/src/stdafx.h11
-rw-r--r--protocols/Steam/src/steam_contacts.cpp22
2 files changed, 17 insertions, 16 deletions
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 <malloc.h>
#include <time.h>
+#include <map>
+#include <vector>
+#include <string>
+#include <algorithm>
+
#include <newpluginapi.h>
#include <m_database.h>
#include <m_langpack.h>
@@ -30,11 +35,7 @@
#include <m_extraicons.h>
#include <m_gui.h>
#include <m_http.h>
-
-#include <map>
-#include <vector>
-#include <string>
-#include <algorithm>
+#include <m_system_cpp.h>
#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());
}
}