From 391980ce1e890445542441eeb5d9f9cc18ae1baf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 26 Jan 2018 22:31:20 +0300 Subject: code optimization --- plugins/Weather/src/weather_icons.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/Weather/src') diff --git a/plugins/Weather/src/weather_icons.cpp b/plugins/Weather/src/weather_icons.cpp index e9b4c52174..1840dcde66 100644 --- a/plugins/Weather/src/weather_icons.cpp +++ b/plugins/Weather/src/weather_icons.cpp @@ -51,9 +51,9 @@ HICON LoadIconEx(const char* name, bool big) HANDLE GetIconHandle(const char* name) { - for (int i = 0; i < _countof(iconList); i++) - if (mir_strcmp(iconList[i].szName, name) == 0) - return iconList[i].hIcolib; + for (auto &it : iconList) + if (mir_strcmp(it.szName, name) == 0) + return it.hIcolib; return nullptr; } -- cgit v1.2.3