Differences From Artifact [f7473af41f]:
- File
src/OFMutableArray.m
— part of check-in
[4af49a13c3]
at
2017-05-07 20:10:13
on branch trunk
— Small code style change
Casts are now written like types in variable declarations. (user: js, size: 7532) [annotate] [blame] [check-ins using]
To Artifact [a54de56242]:
- File src/OFMutableArray.m — part of check-in [31c0f5b89e] at 2017-10-22 14:09:23 on branch 0.90 — Make Apple GCC with -Wshadow happy (user: js, size: 7500) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
206 207 208 209 210 211 212 | - (void)addObjectsFromArray: (OFArray *)array { [self insertObjectsFromArray: array atIndex: [self count]]; } - (void)insertObject: (id)object | | | | | | | | 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 240 241 242 243 244 | - (void)addObjectsFromArray: (OFArray *)array { [self insertObjectsFromArray: array atIndex: [self count]]; } - (void)insertObject: (id)object atIndex: (size_t)idx { OF_UNRECOGNIZED_SELECTOR } - (void)insertObjectsFromArray: (OFArray *)array atIndex: (size_t)idx { size_t i = 0; for (id object in array) [self insertObject: object atIndex: idx + i++]; } - (void)replaceObjectAtIndex: (size_t)idx withObject: (id)object { OF_UNRECOGNIZED_SELECTOR } - (void)setObject: (id)object atIndexedSubscript: (size_t)idx { [self replaceObjectAtIndex: idx withObject: object]; } - (void)replaceObject: (id)oldObject withObject: (id)newObject { size_t count; |
︙ | ︙ | |||
273 274 275 276 277 278 279 | withObject: newObject]; return; } } } | | | 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | withObject: newObject]; return; } } } - (void)removeObjectAtIndex: (size_t)idx { OF_UNRECOGNIZED_SELECTOR } - (void)removeObject: (id)object { size_t count; |
︙ | ︙ | |||
338 339 340 341 342 343 344 | { [self removeObjectsInRange: of_range(0, [self count])]; } #ifdef OF_HAVE_BLOCKS - (void)replaceObjectsUsingBlock: (of_array_replace_block_t)block { | | | | | | | | | | | 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 | { [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 idx, bool *stop) { id new = block(object, idx); if (new != object) [self replaceObjectAtIndex: idx withObject: new]; }]; } #endif - (void)exchangeObjectAtIndex: (size_t)idx1 withObjectAtIndex: (size_t)idx2 { id object1 = [self objectAtIndex: idx1]; id object2 = [self objectAtIndex: idx2]; [object1 retain]; @try { [self replaceObjectAtIndex: idx1 withObject: object2]; [self replaceObjectAtIndex: idx2 withObject: object1]; } @finally { [object1 release]; } } - (void)sort |
︙ | ︙ |