summaryrefslogtreecommitdiff
path: root/plugins/MirLua
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-01-26 22:31:20 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-01-26 22:31:27 +0300
commit391980ce1e890445542441eeb5d9f9cc18ae1baf (patch)
treeee1b165175dcdaeeaabd2ddb822542e648663a90 /plugins/MirLua
parentbf8ad124d03b4fd059318d9ba8889b11faaf5b53 (diff)
code optimization
Diffstat (limited to 'plugins/MirLua')
-rw-r--r--plugins/MirLua/src/mlua_icons.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/MirLua/src/mlua_icons.cpp b/plugins/MirLua/src/mlua_icons.cpp
index 4b13f8c52e..64648484ed 100644
--- a/plugins/MirLua/src/mlua_icons.cpp
+++ b/plugins/MirLua/src/mlua_icons.cpp
@@ -16,18 +16,18 @@ void InitIcons()
HICON GetIcon(int iconId)
{
- for (size_t i = 0; i < _countof(Icons); i++)
- if (Icons[i].defIconID == iconId)
- return IcoLib_GetIconByHandle(Icons[i].hIcolib);
+ for (auto &it : Icons)
+ if (it.defIconID == iconId)
+ return IcoLib_GetIconByHandle(it.hIcolib);
return nullptr;
}
HANDLE GetIconHandle(int iconId)
{
- for (size_t i = 0; i < _countof(Icons); i++)
- if (Icons[i].defIconID == iconId)
- return Icons[i].hIcolib;
+ for (auto &it : Icons)
+ if (it.defIconID == iconId)
+ return it.hIcolib;
return nullptr;
} \ No newline at end of file