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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
|
changeset: 46457:2c778979f15a
user: Eli Friedman <sharparrow1@yahoo.com>
date: Wed Jun 30 23:11:43 2010 +0200
summary: Bug 573210 - Consistently qualify accesses to dependent base classes in xpcom C++ code. r=dbaron
diff -r 93fabb73299b -r 2c778979f15a xpcom/base/nsAutoRef.h
--- xpcom/base/nsAutoRef.h Wed Jun 30 23:11:41 2010 +0200
+++ xpcom/base/nsAutoRef.h Wed Jun 30 23:11:43 2010 +0200
@@ -301,7 +301,7 @@
}
ThisClass& operator=(RawRef aRefToCopy)
{
- own(aRefToCopy);
+ this->own(aRefToCopy);
SafeAddRef();
return *this;
}
@@ -323,7 +323,7 @@
void SafeAddRef()
{
if (this->HaveResource())
- AddRef(this->get());
+ this->AddRef(this->get());
}
};
@@ -690,7 +690,7 @@
void SafeRelease()
{
if (this->HaveResource())
- Release(this->get());
+ this->Release(this->get());
}
};
diff -r 93fabb73299b -r 2c778979f15a xpcom/glue/nsBaseHashtable.h
--- xpcom/glue/nsBaseHashtable.h Wed Jun 30 23:11:41 2010 +0200
+++ xpcom/glue/nsBaseHashtable.h Wed Jun 30 23:11:43 2010 +0200
@@ -123,7 +123,7 @@
*/
PRBool Get(KeyType aKey, UserDataType* pData NS_OUTPARAM) const
{
- EntryType* ent = GetEntry(aKey);
+ EntryType* ent = this->GetEntry(aKey);
if (!ent)
return PR_FALSE;
@@ -160,7 +160,7 @@
*/
PRBool Put(KeyType aKey, UserDataType aData)
{
- EntryType* ent = PutEntry(aKey);
+ EntryType* ent = this->PutEntry(aKey);
if (!ent)
return PR_FALSE;
@@ -174,7 +174,7 @@
* remove the data for the associated key
* @param aKey the key to remove from the hashtable
*/
- void Remove(KeyType aKey) { RemoveEntry(aKey); }
+ void Remove(KeyType aKey) { this->RemoveEntry(aKey); }
/**
* function type provided by the application for enumeration.
diff -r 93fabb73299b -r 2c778979f15a xpcom/glue/nsClassHashtable.h
--- xpcom/glue/nsClassHashtable.h Wed Jun 30 23:11:41 2010 +0200
+++ xpcom/glue/nsClassHashtable.h Wed Jun 30 23:11:43 2010 +0200
@@ -57,6 +57,7 @@
public:
typedef typename KeyClass::KeyType KeyType;
typedef T* UserDataType;
+ typedef nsBaseHashtable< KeyClass, nsAutoPtr<T>, T* > base_type;
/**
* @copydoc nsBaseHashtable::Get
@@ -80,6 +81,7 @@
public:
typedef typename KeyClass::KeyType KeyType;
typedef T* UserDataType;
+ typedef nsBaseHashtableMT< KeyClass, nsAutoPtr<T>, T* > base_type;
/**
* @copydoc nsBaseHashtable::Get
@@ -97,8 +99,7 @@
PRBool
nsClassHashtable<KeyClass,T>::Get(KeyType aKey, T** retVal) const
{
- typename nsBaseHashtable<KeyClass,nsAutoPtr<T>,T*>::EntryType* ent =
- GetEntry(aKey);
+ typename base_type::EntryType* ent = this->GetEntry(aKey);
if (ent)
{
@@ -125,8 +126,7 @@
{
PR_Lock(this->mLock);
- typename nsBaseHashtableMT<KeyClass,nsAutoPtr<T>,T*>::EntryType* ent =
- GetEntry(aKey);
+ typename base_type::EntryType* ent = this->GetEntry(aKey);
if (ent)
{
diff -r 93fabb73299b -r 2c778979f15a xpcom/glue/nsInterfaceHashtable.h
--- xpcom/glue/nsInterfaceHashtable.h Wed Jun 30 23:11:41 2010 +0200
+++ xpcom/glue/nsInterfaceHashtable.h Wed Jun 30 23:11:43 2010 +0200
@@ -57,6 +57,8 @@
public:
typedef typename KeyClass::KeyType KeyType;
typedef Interface* UserDataType;
+ typedef nsBaseHashtable< KeyClass, nsCOMPtr<Interface> , Interface* >
+ base_type;
/**
* @copydoc nsBaseHashtable::Get
@@ -87,6 +89,8 @@
public:
typedef typename KeyClass::KeyType KeyType;
typedef Interface* UserDataType;
+ typedef nsBaseHashtableMT< KeyClass, nsCOMPtr<Interface> , Interface* >
+ base_type;
/**
* @copydoc nsBaseHashtable::Get
@@ -110,8 +114,7 @@
nsInterfaceHashtable<KeyClass,Interface>::Get
(KeyType aKey, UserDataType* pInterface) const
{
- typename nsBaseHashtable<KeyClass, nsCOMPtr<Interface>, Interface*>::EntryType* ent =
- GetEntry(aKey);
+ typename base_type::EntryType* ent = this->GetEntry(aKey);
if (ent)
{
@@ -138,8 +141,7 @@
nsInterfaceHashtable<KeyClass,Interface>::GetWeak
(KeyType aKey, PRBool* aFound) const
{
- typename nsBaseHashtable<KeyClass, nsCOMPtr<Interface>, Interface*>::EntryType* ent =
- GetEntry(aKey);
+ typename base_type::EntryType* ent = this->GetEntry(aKey);
if (ent)
{
@@ -166,8 +168,7 @@
{
PR_Lock(this->mLock);
- typename nsBaseHashtableMT<KeyClass, nsCOMPtr<Interface>, Interface*>::EntryType* ent =
- GetEntry(aKey);
+ typename base_type::EntryType* ent = this->GetEntry(aKey);
if (ent)
{
diff -r 93fabb73299b -r 2c778979f15a xpcom/glue/nsRefPtrHashtable.h
--- xpcom/glue/nsRefPtrHashtable.h Wed Jun 30 23:11:41 2010 +0200
+++ xpcom/glue/nsRefPtrHashtable.h Wed Jun 30 23:11:43 2010 +0200
@@ -58,6 +58,7 @@
public:
typedef typename KeyClass::KeyType KeyType;
typedef RefPtr* UserDataType;
+ typedef nsBaseHashtable< KeyClass, nsRefPtr<RefPtr> , RefPtr* > base_type;
/**
* @copydoc nsBaseHashtable::Get
@@ -88,6 +89,7 @@
public:
typedef typename KeyClass::KeyType KeyType;
typedef RefPtr* UserDataType;
+ typedef nsBaseHashtableMT< KeyClass, nsRefPtr<RefPtr> , RefPtr* > base_type;
/**
* @copydoc nsBaseHashtable::Get
@@ -111,8 +113,7 @@
nsRefPtrHashtable<KeyClass,RefPtr>::Get
(KeyType aKey, UserDataType* pRefPtr) const
{
- typename nsBaseHashtable<KeyClass, nsRefPtr<RefPtr>, RefPtr*>::EntryType* ent =
- GetEntry(aKey);
+ typename base_type::EntryType* ent = this->GetEntry(aKey);
if (ent)
{
@@ -139,8 +140,7 @@
nsRefPtrHashtable<KeyClass,RefPtr>::GetWeak
(KeyType aKey, PRBool* aFound) const
{
- typename nsBaseHashtable<KeyClass, nsRefPtr<RefPtr>, RefPtr*>::EntryType* ent =
- GetEntry(aKey);
+ typename base_type::EntryType* ent = this->GetEntry(aKey);
if (ent)
{
@@ -167,8 +167,7 @@
{
PR_Lock(this->mLock);
- typename nsBaseHashtableMT<KeyClass, nsRefPtr<RefPtr>, RefPtr*>::EntryType* ent =
- GetEntry(aKey);
+ typename base_type::EntryType* ent = this->GetEntry(aKey);
if (ent)
{
diff -r 93fabb73299b -r 2c778979f15a xpcom/glue/nsTPtrArray.h
--- xpcom/glue/nsTPtrArray.h Wed Jun 30 23:11:41 2010 +0200
+++ xpcom/glue/nsTPtrArray.h Wed Jun 30 23:11:43 2010 +0200
@@ -64,13 +64,13 @@
// Initialize this array and pre-allocate some number of elements.
explicit nsTPtrArray(size_type capacity) {
- SetCapacity(capacity);
+ this->SetCapacity(capacity);
}
// The array's copy-constructor performs a 'deep' copy of the given array.
// @param other The array object to copy.
nsTPtrArray(const self_type& other) {
- AppendElements(other);
+ this->AppendElements(other);
}
//
|