diff options
author | George Hazan <ghazan@miranda.im> | 2018-02-21 18:36:58 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-02-21 18:40:14 +0300 |
commit | 40dc4c27f7d2ea66ff570281a992415a0e6578a2 (patch) | |
tree | 3251fec6eb55fac7e7c63bb7555d17f9269aba87 /protocols/IRCG/src/ircproto.cpp | |
parent | e8f69d4e566a3e73ff656beebcae9916e9148589 (diff) |
IRC: C++'11 iterators
Diffstat (limited to 'protocols/IRCG/src/ircproto.cpp')
-rw-r--r-- | protocols/IRCG/src/ircproto.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index 69b19da59b..323e1dd587 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -242,13 +242,12 @@ int CIrcProto::OnModulesLoaded(WPARAM, LPARAM) OBJLIST<CMStringA> performToConvert(10);
db_enum_settings(NULL, sttCheckPerform, m_szModuleName, &performToConvert);
- for (int i = 0; i < performToConvert.getCount(); i++) {
- CMStringA s = performToConvert[i];
+ for (auto &it : performToConvert) {
DBVARIANT dbv;
- if (!getWString(s, &dbv)) {
- db_unset(NULL, m_szModuleName, s);
- s.MakeUpper();
- setWString(s, dbv.ptszVal);
+ if (!getWString(*it, &dbv)) {
+ db_unset(NULL, m_szModuleName, *it);
+ it->MakeUpper();
+ setWString(*it, dbv.ptszVal);
db_free(&dbv);
}
}
|