diff options
author | George Hazan <ghazan@miranda.im> | 2018-01-26 22:31:20 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-01-26 22:31:27 +0300 |
commit | 391980ce1e890445542441eeb5d9f9cc18ae1baf (patch) | |
tree | ee1b165175dcdaeeaabd2ddb822542e648663a90 /plugins/CloudFile/src | |
parent | bf8ad124d03b4fd059318d9ba8889b11faaf5b53 (diff) |
code optimization
Diffstat (limited to 'plugins/CloudFile/src')
-rw-r--r-- | plugins/CloudFile/src/icons.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/CloudFile/src/icons.cpp b/plugins/CloudFile/src/icons.cpp index ae89626884..72d7c22314 100644 --- a/plugins/CloudFile/src/icons.cpp +++ b/plugins/CloudFile/src/icons.cpp @@ -16,27 +16,27 @@ void InitializeIcons() 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; } HANDLE GetIconHandle(const char *name) { - for (size_t i = 0; i < _countof(iconList); i++) - if (mir_strcmpi(iconList[i].szName, name) == 0) - return iconList[i].hIcolib; + for (auto &it : iconList) + if (mir_strcmpi(it.szName, name) == 0) + return it.hIcolib; return nullptr; } 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; }
\ No newline at end of file |