summaryrefslogtreecommitdiff
path: root/protocols/VKontakte
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2015-07-23 10:12:12 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2015-07-23 10:12:12 +0000
commit87432e38cd1dbe0fec239918ce16b51de55c74a2 (patch)
tree07049794aed8c1743bc3f9ff450cb8c04b34d50f /protocols/VKontakte
parent371c87af33810c934034161947c143ccbf6aa01b (diff)
VKontakte:
warning fix code cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@14649 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r--protocols/VKontakte/src/vk_feed.cpp8
-rw-r--r--protocols/VKontakte/src/vk_queue.cpp2
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp32
3 files changed, 21 insertions, 21 deletions
diff --git a/protocols/VKontakte/src/vk_feed.cpp b/protocols/VKontakte/src/vk_feed.cpp
index 487040ffb5..e8c68db7a9 100644
--- a/protocols/VKontakte/src/vk_feed.cpp
+++ b/protocols/VKontakte/src/vk_feed.cpp
@@ -527,14 +527,14 @@ void CVkProto::RetrieveUnreadNews(time_t tLastNewsTime)
return;
}
- Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/newsfeed.get.json", true, &CVkProto::OnReceiveUnreadNews))
+ Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/newsfeed.get.json", true, &CVkProto::OnReceiveUnreadNews)
<< INT_PARAM("count", 100)
<< INT_PARAM("return_banned", m_bNewsSourceIncludeBanned ? 1 : 0)
<< INT_PARAM("max_photos", m_iMaxLoadNewsPhoto)
<< INT_PARAM("start_time", tLastNewsTime + 1)
<< CHAR_PARAM("filters", szFilter)
<< CHAR_PARAM("source_ids", szSource)
- << VER_API;
+ << VER_API);
setDword("LastNewsReqTime", (DWORD)time(NULL));
}
@@ -618,9 +618,9 @@ void CVkProto::RetrieveUnreadNotifications(time_t tLastNotificationsTime)
(LONG)(tLastNotificationsTime + 1),
m_bNotificationFilterInvites ? _T(",\"groupinvates\":API.groups.getInvites({\"extended\":1})};") : _T("};"));
- Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/execute.json", true, &CVkProto::OnReceiveUnreadNotifications))
+ Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/execute.json", true, &CVkProto::OnReceiveUnreadNotifications)
<< TCHAR_PARAM("code", code)
- << VER_API;
+ << VER_API);
setDword("LastNotificationsReqTime", (DWORD)time(NULL));
}
diff --git a/protocols/VKontakte/src/vk_queue.cpp b/protocols/VKontakte/src/vk_queue.cpp
index 5eb8ae1fc2..95493baed3 100644
--- a/protocols/VKontakte/src/vk_queue.cpp
+++ b/protocols/VKontakte/src/vk_queue.cpp
@@ -98,7 +98,7 @@ void CVkProto::WorkerThread(void*)
char Score[] = "friends,photos,audio,docs,video,wall,messages,offline,status,notifications,groups";
- CMStringA szAccessScore = ptrA(getStringA("AccessScore"));
+ CMStringA szAccessScore(ptrA(getStringA("AccessScore")));
if (szAccessScore != Score) {
setString("AccessScore", Score);
delSetting("AccessToken");
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index 0be2273a07..5ca562230d 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -147,21 +147,21 @@ void CVkProto::OnOAuthAuthorize(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq
}
}
else {
- AsyncHttpRequest *pReq = new AsyncHttpRequest();
- pReq->requestType = REQUEST_GET;
- pReq->flags = NLHRF_DUMPASTEXT | NLHRF_HTTP11;
- pReq->m_pFunc = &CVkProto::OnOAuthAuthorize;
- pReq->AddHeader("Referer", m_prevUrl);
- pReq->Redirect(reply);
- if (!pReq->m_szUrl.IsEmpty()) {
- if (pReq->m_szUrl[0] == '/')
- pReq->m_szUrl = VK_LOGIN_DOMAIN + pReq->m_szUrl;
- ApplyCookies(pReq);
- m_prevUrl = pReq->m_szUrl;
+ AsyncHttpRequest *pRedirectReq = new AsyncHttpRequest();
+ pRedirectReq->requestType = REQUEST_GET;
+ pRedirectReq->flags = NLHRF_DUMPASTEXT | NLHRF_HTTP11;
+ pRedirectReq->m_pFunc = &CVkProto::OnOAuthAuthorize;
+ pRedirectReq->AddHeader("Referer", m_prevUrl);
+ pRedirectReq->Redirect(reply);
+ if (!pRedirectReq->m_szUrl.IsEmpty()) {
+ if (pRedirectReq->m_szUrl[0] == '/')
+ pRedirectReq->m_szUrl = VK_LOGIN_DOMAIN + pRedirectReq->m_szUrl;
+ ApplyCookies(pRedirectReq);
+ m_prevUrl = pRedirectReq->m_szUrl;
}
- pReq->m_bApiReq = false;
- pReq->bIsMainConn = true;
- Push(pReq);
+ pRedirectReq->m_bApiReq = false;
+ pRedirectReq->bIsMainConn = true;
+ Push(pRedirectReq);
}
}
else
@@ -599,7 +599,7 @@ void CVkProto::OnReceiveDeleteFriend(NETLIBHTTPREQUEST* reply, AsyncHttpRequest*
JSONNode jnRoot;
const JSONNode &jnResponse = CheckJsonResponse(pReq, reply, jnRoot);
if (!jnResponse.isnull()) {
- CMString tszNick = ptrT(db_get_tsa(param->hContact, m_szModuleName, "Nick"));
+ CMString tszNick(ptrT(db_get_tsa(param->hContact, m_szModuleName, "Nick")));
if (tszNick.IsEmpty())
tszNick = TranslateT("(Unknown contact)");
CMString msgformat, msg;
@@ -697,7 +697,7 @@ INT_PTR __cdecl CVkProto::SvcReportAbuse(WPARAM hContact, LPARAM)
return 1;
CMString formatstr = TranslateT("Are you sure to report abuse on %s?"),
- tszNick = ptrT(db_get_tsa(hContact, m_szModuleName, "Nick")),
+ tszNick(ptrT(db_get_tsa(hContact, m_szModuleName, "Nick"))),
ptszMsg;
ptszMsg.AppendFormat(formatstr, tszNick.IsEmpty() ? TranslateT("(Unknown contact)") : tszNick);
if (IDNO == MessageBox(NULL, ptszMsg, TranslateT("Attention!"), MB_ICONWARNING | MB_YESNO))