summaryrefslogtreecommitdiff
path: root/include
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 /include
parentecbca42677af470d672e66d3f6950af208f8f212 (diff)
LIST<>::indexOf(T**) - fast index calculation for direct iterators
Diffstat (limited to 'include')
-rw-r--r--include/m_system_cpp.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/m_system_cpp.h b/include/m_system_cpp.h
index b262254dfb..b0f15305de 100644
--- a/include/m_system_cpp.h
+++ b/include/m_system_cpp.h
@@ -233,6 +233,7 @@ template<class T> struct LIST
__inline int insert(T *p) { return List_InsertPtr((SortedList*)this, p); }
__inline int remove(T *p) { return List_RemovePtr((SortedList*)this, p); }
+ __inline int indexOf(T **p) const { return int(p - items); }
__inline T* removeItem(T **p)
{
T *savePtr = *p;