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/Clist_modern/src/modern_clui.cpp | |
parent | bf8ad124d03b4fd059318d9ba8889b11faaf5b53 (diff) |
code optimization
Diffstat (limited to 'plugins/Clist_modern/src/modern_clui.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_clui.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 074ba54b7c..6f0eb8630a 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -470,10 +470,11 @@ HICON GetMainStatusOverlay(int STATUS) void UnloadAvatarOverlayIcon()
{
- for (int i = 0; i < _countof(g_pAvatarOverlayIcons); i++) {
- g_pAvatarOverlayIcons[i].listID = -1;
- g_pStatusOverlayIcons[i].listID = -1;
- }
+ for (auto &it : g_pAvatarOverlayIcons)
+ it.listID = -1;
+ for (auto &it : g_pStatusOverlayIcons)
+ it.listID = -1;
+
ImageList_Destroy(hAvatarOverlays);
hAvatarOverlays = nullptr;
DestroyIcon_protect(g_hListeningToIcon);
|