From 477a6ea70d0bb1b1dfe9cbd9a15b6dad0284ddeb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 21 Feb 2018 18:40:03 +0300 Subject: all another C++'11 iterators --- plugins/DbEditorPP/src/modsettingenum.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'plugins/DbEditorPP/src/modsettingenum.cpp') 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; -- cgit v1.2.3