summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/mlua_options.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/MirLua/src/mlua_options.cpp
parent9d0174ebe2bd005418855b18f737c36d5c20ab4a (diff)
all another C++'11 iterators
Diffstat (limited to 'plugins/MirLua/src/mlua_options.cpp')
-rw-r--r--plugins/MirLua/src/mlua_options.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/MirLua/src/mlua_options.cpp b/plugins/MirLua/src/mlua_options.cpp
index 6a2dbd669b..9a4438d408 100644
--- a/plugins/MirLua/src/mlua_options.cpp
+++ b/plugins/MirLua/src/mlua_options.cpp
@@ -34,12 +34,11 @@ CMLuaOptions::CMLuaOptions(int idDialog)
void CMLuaOptions::LoadScripts()
{
- for (int i = 0; i < g_mLua->Scripts.getCount(); i++)
+ for (auto &it : g_mLua->Scripts)
{
- CMLuaScript *script = g_mLua->Scripts[i];
- wchar_t *fileName = NEWWSTR_ALLOCA(script->GetFileName());
- int iIcon = script->GetStatus() - 1;
- int iItem = m_scripts.AddItem(fileName, iIcon, (LPARAM)script);
+ wchar_t *fileName = NEWWSTR_ALLOCA(it->GetFileName());
+ int iIcon = it->GetStatus() - 1;
+ int iItem = m_scripts.AddItem(fileName, iIcon, (LPARAM)it);
if (db_get_b(NULL, MODULE, _T2A(fileName), 1))
m_scripts.SetCheckState(iItem, TRUE);
m_scripts.SetItem(iItem, 1, TranslateT("Open"), 2);