summaryrefslogtreecommitdiff
path: root/plugins/SmileyAdd
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 /plugins/SmileyAdd
parentecbca42677af470d672e66d3f6950af208f8f212 (diff)
LIST<>::indexOf(T**) - fast index calculation for direct iterators
Diffstat (limited to 'plugins/SmileyAdd')
-rw-r--r--plugins/SmileyAdd/src/SmileyBase.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/SmileyAdd/src/SmileyBase.cpp b/plugins/SmileyAdd/src/SmileyBase.cpp
index e9ef6722d8..6394a9ba6a 100644
--- a/plugins/SmileyAdd/src/SmileyBase.cpp
+++ b/plugins/SmileyAdd/src/SmileyBase.cpp
@@ -376,9 +376,9 @@ void CloseSmileys(void)
int CheckForTip(int x, int y, HWND hwnd, wchar_t **smltxt)
{
- for (int i = 0; i < regSmileys.getCount(); i++)
- if (regSmileys[i]->QueryHitPointSpecial(x, y, hwnd, smltxt))
- return i;
+ for (auto &it : regSmileys)
+ if (it->QueryHitPointSpecial(x, y, hwnd, smltxt))
+ return regSmileys.indexOf(&it);
return -1;
}