diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-26 19:27:07 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-26 19:27:07 +0000 |
commit | aedb67d5f6d0f75ba268d9c0ba9b3cf127c9b3c9 (patch) | |
tree | fae850a6364dbb02b40304d109462831261a1689 | |
parent | 648a01a82835a8b0dc9d831955fda6996fc00836 (diff) |
unused node conversion removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@6638 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index 2b19032c5c..98a0f0ba77 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -459,13 +459,9 @@ void CVkProto::PollUpdates(JSONNODE *pUpdates) JSONNODE *pChild;
for (int i=0; (pChild = json_at(pUpdates, i)) != NULL; i++) {
- JSONNODE *pArray = json_as_array(pChild);
- if (pArray == NULL)
- continue;
-
- switch (json_as_int( json_at(pArray, 0))) {
+ switch (json_as_int( json_at(pChild, 0))) {
case VKPOLL_MSG_ADDED: // new message
- msgid = json_as_int( json_at(pArray, 1));
+ msgid = json_as_int( json_at(pChild, 1));
if ( !CheckMid(msgid)) {
if ( !mids.IsEmpty())
mids.AppendChar(',');
@@ -474,19 +470,19 @@ void CVkProto::PollUpdates(JSONNODE *pUpdates) break;
case VKPOLL_USR_ONLINE:
- uid = -json_as_int( json_at(pArray, 1));
+ uid = -json_as_int( json_at(pChild, 1));
if ((hContact = FindUser(uid)) != NULL)
setWord(hContact, "Status", ID_STATUS_ONLINE);
break;
case VKPOLL_USR_OFFLINE:
- uid = -json_as_int( json_at(pArray, 1));
+ uid = -json_as_int( json_at(pChild, 1));
if ((hContact = FindUser(uid)) != NULL)
setWord(hContact, "Status", ID_STATUS_OFFLINE);
break;
case VKPOLL_USR_UTN:
- uid = json_as_int( json_at(pArray, 1));
+ uid = json_as_int( json_at(pChild, 1));
if ((hContact = FindUser(uid)) != NULL)
CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, 5);
break;
|