diff options
author | George Hazan <ghazan@miranda.im> | 2018-01-26 22:31:20 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-01-26 22:31:27 +0300 |
commit | 391980ce1e890445542441eeb5d9f9cc18ae1baf (patch) | |
tree | ee1b165175dcdaeeaabd2ddb822542e648663a90 /protocols/JabberG/src/jabber_misc.cpp | |
parent | bf8ad124d03b4fd059318d9ba8889b11faaf5b53 (diff) |
code optimization
Diffstat (limited to 'protocols/JabberG/src/jabber_misc.cpp')
-rwxr-xr-x | protocols/JabberG/src/jabber_misc.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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;
}
|