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/Variables/src/contact.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/Variables/src') diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp index c9a5785f16..270ae015b8 100644 --- a/plugins/Variables/src/contact.cpp +++ b/plugins/Variables/src/contact.cpp @@ -99,9 +99,9 @@ BYTE getContactInfoType(wchar_t* type) if (type == nullptr || mir_wstrlen(type) == 0) return 0; - for (int i = 0; i < _countof(builtinCnfs); i++) - if (!mir_wstrcmp(builtinCnfs[i].str, type)) - return builtinCnfs[i].cnfCode; + for (auto &it : builtinCnfs) + if (!mir_wstrcmp(it.str, type)) + return it.cnfCode; return 0; } -- cgit v1.2.3