ObjFW  Diff

Differences From Artifact [9d4a37306d]:

To Artifact [397d9a1a3d]:


196
197
198
199
200
201
202






























203
204
205
206
207
208
209
{
	id object = [self objectAtIndex: [array count] - 1];
	[array removeLastItem];
	[object release];

	mutations++;
}































- (int)countByEnumeratingWithState: (of_fast_enumeration_state_t*)state
			   objects: (id*)objects
			     count: (int)count
{
	/*
	 * Super means the implementation from OFArray here, as OFMutableArray







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
{
	id object = [self objectAtIndex: [array count] - 1];
	[array removeLastItem];
	[object release];

	mutations++;
}

- (void)swapObjectAtIndex: (size_t)index1
	withObjectAtIndex: (size_t)index2
{
	id *cArray = [array cArray];
	size_t count = [array count];
	id tmp;

	if (index1 >= count || index2 >= count)
		@throw [OFOutOfRangeException exceptionWithClass: isa];

	tmp = cArray[index1];
	cArray[index1] = cArray[index2];
	cArray[index2] = tmp;
}

- (void)reverse
{
	id *cArray = [array cArray];
	size_t i, j, count = [array count];

	if (count == 0 || count == 1)
		return;

	for (i = 0, j = count - 1; i < j; i++, j--) {
		id tmp = cArray[i];
		cArray[i] = cArray[j];
		cArray[j] = tmp;
	}
}

- (int)countByEnumeratingWithState: (of_fast_enumeration_state_t*)state
			   objects: (id*)objects
			     count: (int)count
{
	/*
	 * Super means the implementation from OFArray here, as OFMutableArray