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 /plugins/SmileyAdd | |
parent | ecbca42677af470d672e66d3f6950af208f8f212 (diff) |
LIST<>::indexOf(T**) - fast index calculation for direct iterators
Diffstat (limited to 'plugins/SmileyAdd')
-rw-r--r-- | plugins/SmileyAdd/src/SmileyBase.cpp | 6 |
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;
}
|