summaryrefslogtreecommitdiff
path: root/plugins/DbEditorPP/src/icons.cpp
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/DbEditorPP/src/icons.cpp
parentbf8ad124d03b4fd059318d9ba8889b11faaf5b53 (diff)
code optimization
Diffstat (limited to 'plugins/DbEditorPP/src/icons.cpp')
-rw-r--r--plugins/DbEditorPP/src/icons.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/DbEditorPP/src/icons.cpp b/plugins/DbEditorPP/src/icons.cpp
index 683b90fbe7..6a98c9a86d 100644
--- a/plugins/DbEditorPP/src/icons.cpp
+++ b/plugins/DbEditorPP/src/icons.cpp
@@ -42,9 +42,9 @@ IconItem iconList[] = {
HANDLE GetIcoLibHandle(int icon)
{
- for (int i = 0; i < _countof(iconList); i++)
- if (iconList[i].defIconID == icon)
- return iconList[i].hIcolib;
+ for (auto &it : iconList)
+ if (it.defIconID == icon)
+ return it.hIcolib;
return INVALID_HANDLE_VALUE;
}
@@ -55,9 +55,9 @@ void IcoLibRegister(void)
HICON LoadSkinnedDBEIcon(int icon)
{
- for (int i = 0; i < _countof(iconList); i++)
- if (iconList[i].defIconID == icon)
- return IcoLib_GetIconByHandle(iconList[i].hIcolib);
+ for (auto &it : iconList)
+ if (it.defIconID == icon)
+ return IcoLib_GetIconByHandle(it.hIcolib);
return LoadIcon(hInst, MAKEINTRESOURCE(icon));
}
@@ -69,8 +69,8 @@ HIMAGELIST LoadIcons()
if (!hil)
return nullptr;
- for(int i = 0; i < _countof(dbeIcons); i++)
- ImageList_AddIcon(hil, LoadSkinnedDBEIcon(dbeIcons[i]));
+ for (auto &it : dbeIcons)
+ ImageList_AddIcon(hil, LoadSkinnedDBEIcon(it));
int protoCount = 0;
PROTOACCOUNT **protocols = nullptr;