diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-07 12:19:50 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-07 12:19:50 +0000 |
commit | ae6d0b3c9f732c3770fc4bf00ba2e52012671108 (patch) | |
tree | f04b08982dc161ff37de1889bae8a39895cee0d3 /protocols/VKontakte/src/vk_thread.cpp | |
parent | 9cc628c7871629af3d660029c0d764eef44c733b (diff) |
STL removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@6395 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_thread.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index 1510b5feea..18b10add99 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -149,7 +149,7 @@ void CVkProto::OnReceiveMyInfo(NETLIBHTTPREQUEST *reply) }
JSONNODE *pRoot = json_parse(reply->pData);
- if (pRoot == NULL)
+ if ( !CheckJsonResult(pRoot))
return;
JSONNODE *pResponse = json_get(pRoot, "response");
@@ -160,21 +160,21 @@ void CVkProto::OnReceiveMyInfo(NETLIBHTTPREQUEST *reply) JSONNODE *it = json_at(pResponse, i);
LPCSTR id = json_name(it);
if ( !_stricmp(id, "user_id"))
- setString("ID", json_as_pstring(it).c_str());
+ setTString("ID", ptrT( json_as_string(it)));
else if ( !_stricmp(id, "user_name"))
- setTString("Nick", ptrT( mir_utf8decodeT( json_as_pstring(it).c_str())));
+ setTString("Nick", ptrT( json_as_string(it)));
else if ( !_stricmp(id, "user_sex"))
setByte("Gender", json_as_int(it) == 2 ? 'M' : 'F');
else if ( !_stricmp(id, "user_bdate")) {
- std::string date = json_as_pstring(it);
+ ptrT date( json_as_string(it));
int d, m, y;
- if ( sscanf(date.c_str(), "%d.%d.%d", &d, &m, &y) == 3) {
+ if ( _tscanf(date, _T("%d.%d.%d"), &d, &m, &y) == 3) {
setByte("BirthDay", d);
setByte("BirthMonth", m);
setByte("BirthYear", y);
}
}
else if ( !_stricmp(id, "user_photo"))
- setString("Photo", json_as_pstring(it).c_str());
+ setTString("Photo", ptrT( json_as_string(it)));
}
}
|