summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-23 21:53:44 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-23 21:53:44 +0000
commit10fa9a24ced9d0a37722c53846c1a0bd94047412 (patch)
tree448093c2b54b1056054c7e8da626a573b45c1430 /include
parent34930aff095fe54011f9a42b47b1ad61145d48b9 (diff)
- fix for LIST<T>.ListCopy()
- minor fix for TTB options git-svn-id: http://svn.miranda-ng.org/main/trunk@593 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r--include/m_system_cpp.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/include/m_system_cpp.h b/include/m_system_cpp.h
index 33f4640579..a04898e427 100644
--- a/include/m_system_cpp.h
+++ b/include/m_system_cpp.h
@@ -54,16 +54,6 @@ template<class T> struct LIST
sortFunc = FTSortFunc(id);
}
- __inline LIST& operator=(const LIST& x)
- { destroy();
- #if defined(_STATIC)
- List_ObjCopy((SortedList*)&x, (SortedList*)this, sizeof(T));
- #else
- li.List_ObjCopy((SortedList*)&x, (SortedList*)this, sizeof(T));
- #endif
- return *this;
- }
-
__inline T* operator[](int idx) const { return (idx >= 0 && idx < count) ? items[idx] : NULL; }
__inline int getCount(void) const { return count; }
__inline T** getArray(void) const { return items; }
@@ -74,6 +64,12 @@ template<class T> struct LIST
List_Copy((SortedList*)&x, (SortedList*)this, sizeof(T));
}
+ __inline LIST& operator=(const LIST& x)
+ { destroy();
+ List_Copy((SortedList*)&x, (SortedList*)this, sizeof(T));
+ return *this;
+ }
+
__inline int getIndex(T* p) const
{ int idx;
return ( !List_GetIndex((SortedList*)this, p, &idx)) ? -1 : idx;
@@ -94,6 +90,12 @@ template<class T> struct LIST
li.List_Copy((SortedList*)&x, (SortedList*)this, sizeof(T));
}
+ __inline LIST& operator=(const LIST& x)
+ { destroy();
+ li.List_Copy((SortedList*)&x, (SortedList*)this, sizeof(T));
+ return *this;
+ }
+
__inline int getIndex(T* p) const
{ int idx;
return ( !li.List_GetIndex((SortedList*)this, p, &idx)) ? -1 : idx;