diff options
author | ElzorFox <elzorfox@ya.ru> | 2018-01-31 11:03:05 +0500 |
---|---|---|
committer | ElzorFox <elzorfox@ya.ru> | 2018-01-31 11:03:05 +0500 |
commit | b05eab27cf16f2316694d43211fb31827ceea727 (patch) | |
tree | bfeb5d39b0200d3ebb50198e9b201beb32bf5b9d /protocols/VKontakte/src/vk_chats.cpp | |
parent | ac25aecfd65f1e68677ca93e0f26138fd9dc6f3e (diff) |
VKontakte: ะก++ 11 scope for
Diffstat (limited to 'protocols/VKontakte/src/vk_chats.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_chats.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp index 9594e80f11..fec559ad87 100644 --- a/protocols/VKontakte/src/vk_chats.cpp +++ b/protocols/VKontakte/src/vk_chats.cpp @@ -136,8 +136,7 @@ void CVkProto::OnReceiveChatInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe for (int i = 0; i < cc->m_users.getCount(); i++)
cc->m_users[i].m_bDel = true;
- for (auto it = jnUsers.begin(); it != jnUsers.end(); ++it) {
- const JSONNode &jnUser = (*it);
+ for (auto &jnUser : jnUsers) {
if (!jnUser)
break;
@@ -195,8 +194,7 @@ void CVkProto::OnReceiveChatInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe }
const JSONNode &jnMsgsUsers = jnResponse["msgs_users"];
- for (auto it = jnMsgsUsers.begin(); it != jnMsgsUsers.end(); ++it) {
- const JSONNode &jnUser = (*it);
+ for (auto &jnUser : jnMsgsUsers) {
LONG uid = jnUser["id"].as_int();
CVkChatUser *cu = cc->m_users.find((CVkChatUser*)&uid);
if (cu)
@@ -215,8 +213,7 @@ void CVkProto::OnReceiveChatInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe if (jnMsgs) {
const JSONNode &jnItems = jnMsgs["items"];
if (jnItems) {
- for (auto it = jnItems.begin(); it != jnItems.end(); ++it) {
- const JSONNode &jnMsg = (*it);
+ for (auto &jnMsg : jnItems) {
if (!jnMsg)
break;
|