summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-02-21 18:35:40 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-02-21 18:40:14 +0300
commit058282527241fe458a1aae28d565a727dcc1a811 (patch)
tree7b5d5a1a5abe8052cd9879af19135df5f58a363d /plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
parent429c0d0524e7197a593209468fef530344f5ee05 (diff)
UInfoEx: C++'11 iterators
Diffstat (limited to 'plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp')
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp13
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;