summaryrefslogtreecommitdiff
path: root/protocols/Discord/src/server.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-02-21 18:35:58 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-02-21 18:40:14 +0300
commitb8a1ac529c6615d5ba6aa3d7ea9e8b4fe9ad4b71 (patch)
tree05f3df6a2d296709f46f537eaeefea3c58b24f6c /protocols/Discord/src/server.cpp
parent058282527241fe458a1aae28d565a727dcc1a811 (diff)
Discord: C++'11 iterators
Diffstat (limited to 'protocols/Discord/src/server.cpp')
-rw-r--r--protocols/Discord/src/server.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/protocols/Discord/src/server.cpp b/protocols/Discord/src/server.cpp
index 4dd70b00ab..5a3a41f99b 100644
--- a/protocols/Discord/src/server.cpp
+++ b/protocols/Discord/src/server.cpp
@@ -81,9 +81,8 @@ void CDiscordProto::OnReceiveHistory(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest
arNodes.insert(&p);
}
- for (int i = 0; i < arNodes.getCount(); i++) {
- JSONNode &p = *arNodes[i];
-
+ for (auto &it : arNodes) {
+ auto &p = *it;
CMStringW wszText = PrepareMessageText(p);
CMStringW wszUserId = p["author"]["id"].as_mstring();
SnowFlake msgid = ::getId(p["id"]);