summaryrefslogtreecommitdiff
blob: 83db65b01351a6d6a8e77b176120f31538f8d327 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
diff -ruN solitaire-0.0.2.org/tools/list.h solitaire-0.0.2/tools/list.h
--- solitaire-0.0.2.org/tools/list.h	2004-08-24 00:49:04.000000000 +0200
+++ solitaire-0.0.2/tools/list.h	2006-02-03 11:35:36.000000000 +0100
@@ -90,22 +90,22 @@
 	T &SetNextCurrent  ();
 	T &SetPrevCurrent  ();
 
-	friend cTBList<T> &operator+= <> (cTBList<T> &list1, const cTBList<T> &list2);
-	friend cTBList<T> &operator+= <> (cTBList<T> &list, const T &element);
+//	friend cTBList<T> &operator+= <> (cTBList<T> &list1, const cTBList<T> &list2);
+//	friend cTBList<T> &operator+= <> (cTBList<T> &list, const T &element);
 
-	friend cTBList<T> operator+ <> (const cTBList<T> &list1, const cTBList<T> &list2);
-	friend cTBList<T> operator+ <> (const T &element, const cTBList<T> &list);
-	friend cTBList<T> operator+ <> (const cTBList<T> &list, const T &element);
+//	friend cTBList<T> operator+ <> (const cTBList<T> &list1, const cTBList<T> &list2);
+//	friend cTBList<T> operator+ <> (const T &element, const cTBList<T> &list);
+//	friend cTBList<T> operator+ <> (const cTBList<T> &list, const T &element);
 
 	/*friend cSource &operator<< <> (cSource &dest, const cTBList<T> &list);
-	friend cSource &operator>> <> (cSource &dest, cTBList<T> &list);*/
+//	friend cSource &operator>> <> (cSource &dest, cTBList<T> &list);*/
 };
 
 // Template Implementation (inline funcs)
 
 template<class T>
 inline int cTBList<T>::Find (const T & i) {
-	cTBList<T>::cItem *item = m_First;
+	typename cTBList<T>::cItem *item = m_First;
 	int index = 0;
 
 	while (item && (item->Data != i)) {
@@ -203,7 +203,7 @@
 
 template<class T>
 typename cTBList<T>::cItem *cTBList<T>::NewItem (cTBList<T>::cItem *pBefore, cTBList<T>::cItem *pAfter) const {
-	cTBList<T>::cItem *item = new cTBList<T>::cItem;
+	typename cTBList<T>::cItem *item = new typename cTBList<T>::cItem;
 
 	item->Next = pAfter;
 	item->Prev = pBefore;
@@ -235,7 +235,7 @@
 	if ((int)idx == m_CurPos)
 		return m_Current;
 
-	cTBList<T>::cItem *item;
+	typename cTBList<T>::cItem *item;
 	int dist = idx - m_CurPos;
 	bool direct;
 
@@ -271,7 +271,7 @@
 
 template<class T>
 T &cTBList<T>::Prepend () {
-	cTBList<T>::cItem *item = NewItem(NULL, m_First);
+	typename cTBList<T>::cItem *item = NewItem(NULL, m_First);
 
 	m_First = m_Current = item;
 	if (!m_Last)
@@ -285,7 +285,7 @@
 
 template<class T>
 T &cTBList<T>::Append () {
-	cTBList<T>::cItem *item = NewItem(m_Last, NULL);
+	typename cTBList<T>::cItem *item = NewItem(m_Last, NULL);
 
 	m_Last = m_Current = item;
 	if (!m_First)
@@ -317,13 +317,13 @@
 		return true;
 	}
 
-	cTBList<T>::cItem *nextItem = Locate(idx);
+	typename cTBList<T>::cItem *nextItem = Locate(idx);
 	if (!nextItem)
 		return false;
 
-	cTBList<T>::cItem *prevItem = nextItem->Prev;
+	typename cTBList<T>::cItem *prevItem = nextItem->Prev;
 
-	cTBList<T>::cItem *item = NewItem(prevItem, nextItem);
+	typename cTBList<T>::cItem *item = NewItem(prevItem, nextItem);
 	item->Data = i;
 
 	m_CurPos = idx;
@@ -338,7 +338,7 @@
 	if (!m_Current)
 		return NULL;
 
-	cTBList<T>::cItem *item = m_Current;
+	typename cTBList<T>::cItem *item = m_Current;
 	if (item == m_First) {
 		if (m_First = item->Next)
 			m_First->Prev = NULL;
@@ -370,7 +370,7 @@
 		if (Find(i) == -1)
 			return false;
 
-	cTBList<T>::cItem *item = Unlink();
+	typename cTBList<T>::cItem *item = Unlink();
 	if (!item)
 		return false;
 
@@ -383,7 +383,7 @@
 	if (!Locate(idx))
 		return false;
 
-	cTBList<T>::cItem *item = Unlink();
+	typename cTBList<T>::cItem *item = Unlink();
 	if (!item)
 		return false;
 
@@ -412,13 +412,13 @@
 
 template<class T>
 void cTBList<T>::Clear () {
-	cTBList<T>::cItem *item = m_First;
+	typename cTBList<T>::cItem *item = m_First;
 
 	m_First = m_Last = m_Current = NULL;
 	m_Count = 0;
 	m_CurPos = -1;
 
-	cTBList<T>::cItem *Prev;
+	typename cTBList<T>::cItem *Prev;
 	while (item) {
 		Prev = item;
 		item = item->Next;