diff options
author | George Hazan <ghazan@miranda.im> | 2018-03-16 12:09:30 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-03-16 12:09:38 +0300 |
commit | a7e5e613f86963c8bf82248ab044e0ea36e42fbc (patch) | |
tree | 39e0e6b3ab4bcb55255302d3d1e989b31247bf7b /protocols/VKontakte | |
parent | ecbca42677af470d672e66d3f6950af208f8f212 (diff) |
LIST<>::indexOf(T**) - fast index calculation for direct iterators
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 551ac57da7..07bf5cd0b5 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -229,9 +229,9 @@ bool CVkProto::IsGroupUser(MCONTACT hContact) bool CVkProto::CheckMid(LIST<void> &lList, int guid)
{
- for (int i = lList.getCount() - 1; i >= 0; i--)
- if ((INT_PTR)lList[i] == guid) {
- lList.remove(i);
+ for (auto &it : lList)
+ if ((INT_PTR)it == guid) {
+ lList.remove(lList.indexOf(&it));
return true;
}
|