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/JabberG/src/jabber_misc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'protocols/JabberG/src/jabber_misc.cpp') diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp index b90a09bc53..7c1c4a0b5b 100755 --- a/protocols/JabberG/src/jabber_misc.cpp +++ b/protocols/JabberG/src/jabber_misc.cpp @@ -262,9 +262,9 @@ static sttCapsNodeToName_Map[] = const wchar_t* CJabberProto::GetSoftName(const wchar_t *wszName) { // search through known software list - for (int i = 0; i < _countof(sttCapsNodeToName_Map); i++) - if (wcsstr(wszName, sttCapsNodeToName_Map[i].node)) - return sttCapsNodeToName_Map[i].name; + for (auto &it : sttCapsNodeToName_Map) + if (wcsstr(wszName, it.node)) + return it.name; return nullptr; } -- cgit v1.2.3