summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2015-05-28 15:54:35 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2015-05-28 15:54:35 +0000
commit8af494f775a60cf9174aba872600cf9ddb0ce321 (patch)
tree95304f480e73567427780b4dc13ff28467954a41
parent4fa9a8b4f873f5a97c74c3cac6fc1384b9b22f17 (diff)
VKontakte: small fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@13877 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/VKontakte/src/misc.cpp6
-rw-r--r--protocols/VKontakte/src/vk_proto.h4
-rw-r--r--protocols/VKontakte/src/vk_search.cpp2
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<CVkProto>
bool CheckMid(LIST<void> &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<CVkProto>
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)