Differences From Artifact [fb3dbd6aee]:
- File src/OFMutableArray_adjacent.m — part of check-in [11d3d69a22] at 2012-06-10 13:28:05 on branch trunk — More API improvements. (user: js, size: 6041) [annotate] [blame] [check-ins using]
To Artifact [e388818b36]:
- File
src/OFMutableArray_adjacent.m
— part of check-in
[95e8e1e486]
at
2012-06-10 16:03:01
on branch trunk
— Add a few array methods.
OFArray:
* +[arrayByAddingObject:]
* +[arrayByAddingObjectsFromArray:]OFMutableArray:
* -[addObjectsFromArray:]
* -[insertObjectsFromArray:atIndex:] (user: js, size: 6351) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
45 46 47 48 49 50 51 52 53 54 55 56 57 58 | - (void)insertObject: (id)object atIndex: (size_t)index { [array insertItem: &object atIndex: index]; [object retain]; mutations++; } - (void)replaceObject: (id)oldObject withObject: (id)newObject { id *objects = [array cArray]; | > > > > > > > > > > > > > > > > | 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 | - (void)insertObject: (id)object atIndex: (size_t)index { [array insertItem: &object atIndex: index]; [object retain]; mutations++; } - (void)insertObjectsFromArray: (OFArray*)array_ atIndex: (size_t)index { id *objects = [array_ objects]; size_t i, count = [array_ count]; [array insertItemsFromCArray: objects atIndex: index count: count]; for (i = 0; i < count; i++) [objects[i] retain]; mutations++; } - (void)replaceObject: (id)oldObject withObject: (id)newObject { id *objects = [array cArray]; |
︙ | ︙ |