From 40dc4c27f7d2ea66ff570281a992415a0e6578a2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 21 Feb 2018 18:36:58 +0300 Subject: IRC: C++'11 iterators --- protocols/IRCG/src/ircproto.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'protocols/IRCG/src/ircproto.cpp') 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 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); } } -- cgit v1.2.3