summaryrefslogtreecommitdiff
path: root/plugins/Popup/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/Popup/src/icons.cpp
parentbf8ad124d03b4fd059318d9ba8889b11faaf5b53 (diff)
code optimization
Diffstat (limited to 'plugins/Popup/src/icons.cpp')
-rw-r--r--plugins/Popup/src/icons.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/Popup/src/icons.cpp b/plugins/Popup/src/icons.cpp
index 297a9d982f..b1b5a985fc 100644
--- a/plugins/Popup/src/icons.cpp
+++ b/plugins/Popup/src/icons.cpp
@@ -69,18 +69,18 @@ void InitIcons()
HICON LoadIconEx(int iconId, bool big)
{
- for (int i = 0; i < _countof(iconList); i++)
- if (iconList[i].defIconID == iconId)
- return IcoLib_GetIconByHandle(iconList[i].hIcolib, big);
+ for (auto &it : iconList)
+ if (it.defIconID == iconId)
+ return IcoLib_GetIconByHandle(it.hIcolib, big);
return nullptr;
}
HANDLE GetIconHandle(int iconId)
{
- for (int i = 0; i < _countof(iconList); i++)
- if (iconList[i].defIconID == iconId)
- return iconList[i].hIcolib;
+ for (auto &it : iconList)
+ if (it.defIconID == iconId)
+ return it.hIcolib;
return nullptr;
}