summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/misc.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-16 12:09:30 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-16 12:09:38 +0300
commita7e5e613f86963c8bf82248ab044e0ea36e42fbc (patch)
tree39e0e6b3ab4bcb55255302d3d1e989b31247bf7b /protocols/VKontakte/src/misc.cpp
parentecbca42677af470d672e66d3f6950af208f8f212 (diff)
LIST<>::indexOf(T**) - fast index calculation for direct iterators
Diffstat (limited to 'protocols/VKontakte/src/misc.cpp')
-rw-r--r--protocols/VKontakte/src/misc.cpp6
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;
}