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/SkypeWeb/src/skype_icons.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'protocols/SkypeWeb/src/skype_icons.cpp') diff --git a/protocols/SkypeWeb/src/skype_icons.cpp b/protocols/SkypeWeb/src/skype_icons.cpp index 13427fa894..412d0c0043 100644 --- a/protocols/SkypeWeb/src/skype_icons.cpp +++ b/protocols/SkypeWeb/src/skype_icons.cpp @@ -37,16 +37,16 @@ void CSkypeProto::InitIcons() HICON CSkypeProto::GetIcon(int iconId) { - for (size_t i = 0; i < _countof(Icons); i++) - if (Icons[i].defIconID == iconId) - return IcoLib_GetIconByHandle(Icons[i].hIcolib); + for (auto &it : Icons) + if (it.defIconID == iconId) + return IcoLib_GetIconByHandle(it.hIcolib); return nullptr; } HANDLE CSkypeProto::GetIconHandle(int iconId) { - for (size_t i = 0; i < _countof(Icons); i++) - if (Icons[i].defIconID == iconId) - return Icons[i].hIcolib; + for (auto &it : Icons) + if (it.defIconID == iconId) + return it.hIcolib; return nullptr; } \ No newline at end of file -- cgit v1.2.3