Differences From Artifact [2fdb683912]:
- File src/OFMutableArray.m — part of check-in [6f0ef1c5e1] at 2012-06-06 13:14:23 on branch trunk — Remove -[OFMutableArray removeNObjects:]. (user: js, size: 6504) [annotate] [blame] [check-ins using] [more...]
To Artifact [0bfaa52216]:
- File
src/OFMutableArray.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: 7032) [annotate] [blame] [check-ins using] [more...]
︙ | |||
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + | } - (void)addObject: (id)object { [self insertObject: object atIndex: [self count]]; } - (void)addObjectsFromArray: (OFArray*)array { [self insertObjectsFromArray: array atIndex: [self count]]; } - (void)insertObject: (id)object atIndex: (size_t)index { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; } - (void)insertObjectsFromArray: (OFArray*)array atIndex: (size_t)index { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFEnumerator *enumerator = [array objectEnumerator]; size_t i, count = [array count]; for (i = 0; i < count; i++) { id object = [enumerator nextObject]; assert(object != nil); [self insertObject: object atIndex: index + i]; } [pool release]; } - (void)replaceObjectAtIndex: (size_t)index withObject: (id)object { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; } |
︙ |