diff options
author | George Hazan <ghazan@miranda.im> | 2018-02-21 18:36:32 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-02-21 18:40:14 +0300 |
commit | 6e96535fdbb886dcad1a3396659b368283922e64 (patch) | |
tree | ef1a35a5ca0c43fcf10a1190a47853588e90cddc /protocols/JabberG/src/jabber_thread.cpp | |
parent | fd23a292afc4aa760a0ff8ab646eebe5942fb06d (diff) |
Jabber: C++'11 iterators
Diffstat (limited to 'protocols/JabberG/src/jabber_thread.cpp')
-rwxr-xr-x | protocols/JabberG/src/jabber_thread.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 4801e50179..700512d631 100755 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -157,9 +157,9 @@ void ThreadData::xmpp_client_query(void) if (rec->Data.Srv.pNameTarget && rec->wType == DNS_TYPE_SRV)
dnsList.insert(&rec->Data.Srv);
- for (int i = 0; i < dnsList.getCount(); i++) {
- WORD dnsPort = (conn.port == 0 || conn.port == 5222) ? dnsList[i]->wPort : conn.port;
- char* dnsHost = dnsList[i]->pNameTarget;
+ for (auto &it : dnsList) {
+ WORD dnsPort = (conn.port == 0 || conn.port == 5222) ? it->wPort : conn.port;
+ char* dnsHost = it->pNameTarget;
proto->debugLogA("%s%s resolved to %s:%d", "_xmpp-client._tcp.", conn.server, dnsHost, dnsPort);
s = proto->WsConnect(dnsHost, dnsPort);
|