ObjFW  Check-in [96bbfb777c]

Overview
Comment:Add -[OFArray arrayByRemovingObject:].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 96bbfb777cb6162d0d505abd0de4285d6e065e0860106ff1d3e04b0960317e6f
User & Date: js on 2012-08-04 00:51:09
Other Links: manifest | tags
Context
2012-08-04
08:29
Replace a few init methods with constructors. check-in: c34d45798b user: js tags: trunk
00:51
Add -[OFArray arrayByRemovingObject:]. check-in: 96bbfb777c user: js tags: trunk
00:50
runtime.h: Properly check for __has_feature. check-in: d690b3e135 user: js tags: trunk
Changes

Modified src/OFArray.h from [96960c00c0] to [c839777bdd].

284
285
286
287
288
289
290








291
292
293
294
295
296
297
 * \brief Creates a new array with the objects from the specified array added.
 *
 * \param array The array with objects to add
 * \return A new array with the objects from the specified array added
 */
- (OFArray*)arrayByAddingObjectsFromArray: (OFArray*)array;









#ifdef OF_HAVE_BLOCKS
/**
 * \brief Executes a block for each object.
 *
 * \param block The block to execute for each object
 */
- (void)enumerateObjectsUsingBlock: (of_array_enumeration_block_t)block;







>
>
>
>
>
>
>
>







284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
 * \brief Creates a new array with the objects from the specified array added.
 *
 * \param array The array with objects to add
 * \return A new array with the objects from the specified array added
 */
- (OFArray*)arrayByAddingObjectsFromArray: (OFArray*)array;

/**
 * \brief Creates a new array with the specified object removed.
 *
 * \param object The object to remove
 * \return A new array with the specified object removed
 */
- (OFArray*)arrayByRemovingObject: (id)object;

#ifdef OF_HAVE_BLOCKS
/**
 * \brief Executes a block for each object.
 *
 * \param block The block to execute for each object
 */
- (void)enumerateObjectsUsingBlock: (of_array_enumeration_block_t)block;

Modified src/OFArray.m from [e58f6deb57] to [3601f4b0dd].

617
618
619
620
621
622
623










624
625
626
627
628
629
630
- (OFArray*)arrayByAddingObjectsFromArray: (OFArray*)array
{
	OFMutableArray *ret = [[self mutableCopy] autorelease];

	[ret addObjectsFromArray: array];
	[ret makeImmutable];











	return ret;
}

#ifdef OF_HAVE_BLOCKS
- (OFArray*)mappedArrayUsingBlock: (of_array_map_block_t)block
{
	OFArray *ret;







>
>
>
>
>
>
>
>
>
>







617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
- (OFArray*)arrayByAddingObjectsFromArray: (OFArray*)array
{
	OFMutableArray *ret = [[self mutableCopy] autorelease];

	[ret addObjectsFromArray: array];
	[ret makeImmutable];

	return ret;
}

- (OFArray*)arrayByRemovingObject: (id)object
{
	OFMutableArray *ret = [[self mutableCopy] autorelease];

	[ret removeObject: object];
	[ret makeImmutable];

	return ret;
}

#ifdef OF_HAVE_BLOCKS
- (OFArray*)mappedArrayUsingBlock: (of_array_map_block_t)block
{
	OFArray *ret;