summaryrefslogtreecommitdiff
path: root/plugins/DbEditorPP/src/modsettingenum.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-02-21 18:40:03 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-02-21 18:40:14 +0300
commit477a6ea70d0bb1b1dfe9cbd9a15b6dad0284ddeb (patch)
tree247eed13a5231c3983e343f0b7fc2a95012353c2 /plugins/DbEditorPP/src/modsettingenum.cpp
parent9d0174ebe2bd005418855b18f737c36d5c20ab4a (diff)
all another C++'11 iterators
Diffstat (limited to 'plugins/DbEditorPP/src/modsettingenum.cpp')
-rw-r--r--plugins/DbEditorPP/src/modsettingenum.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/DbEditorPP/src/modsettingenum.cpp b/plugins/DbEditorPP/src/modsettingenum.cpp
index e0a4d40ba1..79e734baf3 100644
--- a/plugins/DbEditorPP/src/modsettingenum.cpp
+++ b/plugins/DbEditorPP/src/modsettingenum.cpp
@@ -103,9 +103,8 @@ int LoadResidentSettings()
void FreeResidentSettings()
{
- for (int i = 0; i < m_lResidentSettings.getCount(); i++)
- mir_free(m_lResidentSettings[i]);
-
+ for (auto &it : m_lResidentSettings)
+ mir_free(it);
m_lResidentSettings.destroy();
}
@@ -132,13 +131,14 @@ int EnumResidentSettings(const char *module, ModuleSettingLL *msll)
int len = (int)mir_strlen(module);
int cnt = 0;
- for (int i = 0; i < m_lResidentSettings.getCount(); i++) {
- if (strncmp(module, m_lResidentSettings[i], len))
+ for (auto &it : m_lResidentSettings) {
+ if (strncmp(module, it, len))
continue;
- if (m_lResidentSettings[i][len] != '/' || m_lResidentSettings[i][len + 1] == 0) continue;
+ if (it[len] != '/' || it[len + 1] == 0)
+ continue;
- enumModulesSettingsProc(&m_lResidentSettings[i][len + 1], msll);
+ enumModulesSettingsProc(&it[len + 1], msll);
cnt++;
}
return cnt;