From aedb67d5f6d0f75ba268d9c0ba9b3cf127c9b3c9 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 26 Oct 2013 19:27:07 +0000 Subject: unused node conversion removed git-svn-id: http://svn.miranda-ng.org/main/trunk@6638 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/vk_thread.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'protocols/VKontakte') 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; -- cgit v1.2.3