From 8af494f775a60cf9174aba872600cf9ddb0ce321 Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Thu, 28 May 2015 15:54:35 +0000 Subject: VKontakte: small fix git-svn-id: http://svn.miranda-ng.org/main/trunk@13877 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/misc.cpp | 6 +++--- protocols/VKontakte/src/vk_proto.h | 4 ++-- protocols/VKontakte/src/vk_search.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 1da3b4cf92..41f2c8c588 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -314,7 +314,7 @@ JSONNode& CVkProto::CheckJsonResponse(AsyncHttpRequest *pReq, NETLIBHTTPREQUEST return root["response"]; } -bool CVkProto::CheckJsonResult(AsyncHttpRequest *pReq, JSONNode &jnNode) +bool CVkProto::CheckJsonResult(AsyncHttpRequest *pReq, const JSONNode &jnNode) { debugLogA("CVkProto::CheckJsonResult"); if (!jnNode) @@ -952,7 +952,7 @@ CMString& CVkProto::ClearFormatNick(CMString& tszText) ///////////////////////////////////////////////////////////////////////////////////////// -CMString CVkProto::GetAttachmentDescr(const JSONNode jnAttachments, BBCSupport iBBC) +CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport iBBC) { debugLogA("CVkProto::GetAttachmentDescr"); CMString res; @@ -965,7 +965,7 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode jnAttachments, BBCSupport i res.AppendChar('\n'); for (auto it = jnAttachments.begin(); it != jnAttachments.end(); ++it) { - const JSONNode jnAttach = (*it); + const JSONNode &jnAttach = (*it); res.AppendChar('\t'); CMString tszType(jnAttach["type"].as_mstring()); diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h index f947cb197c..91beb7f09f 100644 --- a/protocols/VKontakte/src/vk_proto.h +++ b/protocols/VKontakte/src/vk_proto.h @@ -384,7 +384,7 @@ struct CVkProto : public PROTO bool CheckMid(LIST &lList, int guid); JSONNode& CheckJsonResponse(AsyncHttpRequest *pReq, NETLIBHTTPREQUEST *reply, JSONNode &root); - bool CheckJsonResult(AsyncHttpRequest *pReq, JSONNode &Node); + bool CheckJsonResult(AsyncHttpRequest *pReq, const JSONNode &Node); void OnReceiveSmth(NETLIBHTTPREQUEST*, AsyncHttpRequest*); @@ -410,7 +410,7 @@ struct CVkProto : public PROTO CMString SetBBCString(TCHAR *tszString, BBCSupport iBBC, VKBBCType bbcType, TCHAR *tszAddString = NULL); CMString& ClearFormatNick(CMString& tszText); - CMString GetAttachmentDescr(const JSONNode jnAttachments, BBCSupport iBBC = bbcNo); + CMString GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport iBBC = bbcNo); CMString GetFwdMessages(const JSONNode &jnMessages, BBCSupport iBBC = bbcNo); void SetInvisible(MCONTACT hContact); diff --git a/protocols/VKontakte/src/vk_search.cpp b/protocols/VKontakte/src/vk_search.cpp index 212881b2dc..a6e0cbdbba 100644 --- a/protocols/VKontakte/src/vk_search.cpp +++ b/protocols/VKontakte/src/vk_search.cpp @@ -113,7 +113,7 @@ void CVkProto::OnSearch(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) return; } - const JSONNode jnItems = jnResponse["items"].isnull() ? jnResponse : jnResponse["items"]; + const JSONNode &jnItems = jnResponse["items"].isnull() ? jnResponse : jnResponse["items"]; for (auto it = jnItems.begin(); it != jnItems.end(); ++it) { const JSONNode &jnRecord = (*it); if (!jnRecord) -- cgit v1.2.3