diff options
author | George Hazan <ghazan@miranda.im> | 2018-02-21 18:35:40 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-02-21 18:40:14 +0300 |
commit | 058282527241fe458a1aae28d565a727dcc1a811 (patch) | |
tree | 7b5d5a1a5abe8052cd9879af19135df5f58a363d /plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp | |
parent | 429c0d0524e7197a593209468fef530344f5ee05 (diff) |
UInfoEx: C++'11 iterators
Diffstat (limited to 'plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp index 1dec35ecbf..c6fa31e5ff 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp @@ -150,13 +150,8 @@ int CExImContactXML::ExportContact(DB::CEnumList* pModules) {
if (_pXmlFile->_wExport & EXPORT_DATA) {
if (pModules) {
- int i;
- LPSTR p;
-
- for (i = 0; i < pModules->getCount(); i++) {
- p = (*pModules)[i];
- ExportModule(p);
- }
+ for (auto &it : *pModules)
+ ExportModule(it);
}
else {
ExportModule(USERINFO);
@@ -270,8 +265,8 @@ int CExImContactXML::ExportModule(LPCSTR pszModule) return ERROR_MEMORY_ALLOC;
xmod->SetAttribute("key", pszModule);
- for (int i = 0; i < Settings.getCount(); i++)
- ExportSetting(xmod, pszModule, Settings[i]);
+ for (auto &it : Settings)
+ ExportSetting(xmod, pszModule, it);
if (!xmod->NoChildren() && _xmlNode->LinkEndChild(xmod))
return ERROR_OK;
|