From 391980ce1e890445542441eeb5d9f9cc18ae1baf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 26 Jan 2018 22:31:20 +0300 Subject: code optimization --- protocols/Twitter/src/theme.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'protocols/Twitter/src/theme.cpp') diff --git a/protocols/Twitter/src/theme.cpp b/protocols/Twitter/src/theme.cpp index 2e22f7398e..c7e7c69f55 100644 --- a/protocols/Twitter/src/theme.cpp +++ b/protocols/Twitter/src/theme.cpp @@ -46,9 +46,9 @@ void InitIcons(void) HANDLE GetIconHandle(const char *name) { - for (size_t i = 0; i < _countof(icons); i++) - if (mir_strcmp(icons[i].szName, name) == 0) - return icons[i].hIcolib; + for (auto &it : icons) + if (mir_strcmp(it.szName, name) == 0) + return it.hIcolib; return nullptr; } @@ -111,6 +111,6 @@ void InitContactMenus() void ShowContactMenus(bool show) { - for (size_t i = 0; i < _countof(g_hMenuItems); i++) - Menu_ShowItem(g_hMenuItems[i], show); + for (auto &it : g_hMenuItems) + Menu_ShowItem(it, show); } -- cgit v1.2.3