ObjFW  Diff

Differences From Artifact [9461a9b182]:

To Artifact [2fdb683912]:


261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284



285
286
287
288
289
290
291
292
293
294
295
296
297
			[self removeObjectAtIndex: i];

			return;
		}
	}
}

- (void)removeNObjects: (size_t)nObjects
{
	size_t count = [self count];

	[self removeObjectsInRange: of_range(count - nObjects, nObjects)];
}

- (void)removeObjectsInRange: (of_range_t)range
{
	size_t i;

	for (i = 0; i < range.length; i++)
		[self removeObjectAtIndex: range.start];
}

- (void)removeLastObject
{



	[self removeNObjects: 1];
}

- (void)removeAllObjects
{
	[self removeNObjects: [self count]];
}

#ifdef OF_HAVE_BLOCKS
- (void)replaceObjectsUsingBlock: (of_array_replace_block_t)block
{
	[self enumerateObjectsUsingBlock: ^ (id object, size_t index,
	    BOOL *stop) {







<
<
<
<
<
<
<










>
>
>
|




|







261
262
263
264
265
266
267







268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
			[self removeObjectAtIndex: i];

			return;
		}
	}
}








- (void)removeObjectsInRange: (of_range_t)range
{
	size_t i;

	for (i = 0; i < range.length; i++)
		[self removeObjectAtIndex: range.start];
}

- (void)removeLastObject
{
	size_t count = [self count];

	if (count > 0)
		[self removeObjectAtIndex: count - 1];
}

- (void)removeAllObjects
{
	[self removeObjectsInRange: of_range(0, [self count])];
}

#ifdef OF_HAVE_BLOCKS
- (void)replaceObjectsUsingBlock: (of_array_replace_block_t)block
{
	[self enumerateObjectsUsingBlock: ^ (id object, size_t index,
	    BOOL *stop) {