Overview
Comment: | Rename all types in OFArray.h |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | new-naming-convention |
Files: | files | file ages | folders |
SHA3-256: |
e23daca6ef7c05088075d9973ca0f3d3 |
User & Date: | js on 2021-04-17 02:40:59 |
Other Links: | branch diff | manifest | tags |
Context
2021-04-17
| ||
02:43 | Rename of_fast_enumeration_state_t check-in: ed3b07591c user: js tags: new-naming-convention | |
02:40 | Rename all types in OFArray.h check-in: e23daca6ef user: js tags: new-naming-convention | |
02:29 | Rename all types in OFData.h check-in: 88ed17ad48 user: js tags: new-naming-convention | |
Changes
Modified src/OFAdjacentArray.m from [3b91ee05d4] to [e52e34f95b].
︙ | |||
338 339 340 341 342 343 344 | 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | - + | state->itemsPtr = (id *)_array.items; state->mutationsPtr = (unsigned long *)self; return (int)count; } #ifdef OF_HAVE_BLOCKS |
︙ |
Modified src/OFAdjacentSubarray.m from [738b4fad30] to [188174c31a].
︙ | |||
49 50 51 52 53 54 55 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | - + | if (![objects[i] isEqual: otherObjects[i]]) return false; return true; } #ifdef OF_HAVE_BLOCKS |
Modified src/OFArray.h from [3a1f03e7d8] to [091ccdd3f4].
︙ | |||
31 32 33 34 35 36 37 | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 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 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | + + + + + - - - + + + + + - + + + - + - - + - + - + | OF_ASSUME_NONNULL_BEGIN /** @file */ @class OFString; /** * @brief Options for joining the objects of an array. * * This is a bit mask. */ |
︙ | |||
327 328 329 330 331 332 333 | 335 336 337 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 374 375 376 377 | - + - - - - - + - + - - - - - + | */ - (OFString *)componentsJoinedByString: (OFString *)separator; /** * @brief Creates a string by joining all objects of the array. * * @param separator The string with which the objects should be joined |
︙ | |||
389 390 391 392 393 394 395 | 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 | - + - - - - - - + + + - + - - - - - + | /** * @brief Returns a copy of the array sorted using the specified selector and * options. * * @param selector The selector to use to sort the array. It's signature * should be the same as that of -[compare:]. |
︙ | |||
448 449 450 451 452 453 454 | 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 | - + - + - + - + | #ifdef OF_HAVE_BLOCKS /** * @brief Executes a block for each object. * * @param block The block to execute for each object */ |
︙ |
Modified src/OFArray.m from [a442301bcd] to [5dd577c100].
︙ | |||
391 392 393 394 395 396 397 | 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 | - + - + | { return [self componentsJoinedByString: separator usingSelector: @selector(description) options: 0]; } - (OFString *)componentsJoinedByString: (OFString *)separator |
︙ | |||
430 431 432 433 434 435 436 | 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | - + | @throw [OFInvalidArgumentException exception]; return component; } ret = [OFMutableString string]; |
︙ | |||
710 711 712 713 714 715 716 | 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 | - + - + | OFMutableArray *new = [[self mutableCopy] autorelease]; [new sort]; [new makeImmutable]; return new; } - (OFArray *)sortedArrayUsingSelector: (SEL)selector |
︙ | |||
768 769 770 771 772 773 774 | 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 | - + | - (OFEnumerator *)objectEnumerator { return [[[OFArrayEnumerator alloc] initWithArray: self mutationsPtr: NULL] autorelease]; } #ifdef OF_HAVE_BLOCKS |
︙ | |||
814 815 816 817 818 819 820 | 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 | - + - + | OFMutableArray *ret = [[self mutableCopy] autorelease]; [ret removeObject: object]; [ret makeImmutable]; return ret; } #ifdef OF_HAVE_BLOCKS |
︙ | |||
857 858 859 860 861 862 863 | 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 | - + | } @finally { free(tmp); } return ret; } |
︙ |
Modified src/OFData.h from [574e832abc] to [654367484b].
︙ | |||
26 27 28 29 30 31 32 33 34 35 36 37 38 39 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | + | /** * @brief Options for searching in data. * * This is a bit mask. */ typedef enum OFDataSearchOptions { /** Search backwards in the data */ OFDataSearchBackwards = 1 } OFDataSearchOptions; /** * @class OFData OFData.h ObjFW/OFData.h * * @brief A class for storing arbitrary data in an array. |
︙ |
Modified src/OFMutableAdjacentArray.m from [863f03f97e] to [5cfb1b342c].
︙ | |||
326 327 328 329 330 331 332 | 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 | - + - + | { return [[[OFArrayEnumerator alloc] initWithArray: self mutationsPtr: &_mutations] autorelease]; } #ifdef OF_HAVE_BLOCKS |
︙ |
Modified src/OFMutableArray.h from [73afdbce22] to [a684ec1cde].
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - + | /** * @brief A block for replacing values in an OFMutableArray. * * @param object The object to replace * @param index The index of the object to replace * @return The object to replace the object with */ |
︙ | |||
173 174 175 176 177 178 179 | 173 174 175 176 177 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 | - + - + - - - - - + - + - - - - - + + | #ifdef OF_HAVE_BLOCKS /** * @brief Replaces each object with the object returned by the block. * * @param block The block which returns a new object for each object */ |
︙ |
Modified src/OFMutableArray.m from [3c3d4c88e1] to [680aac7358].
︙ | |||
42 43 44 45 46 47 48 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | - + - + | [left methodForSelector: selector]; return comparator(left, selector, right); } static void quicksort(OFMutableArray *array, size_t left, size_t right, SEL selector, |
︙ | |||
88 89 90 91 92 93 94 | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | - + - + | left = i + 1; } } #ifdef OF_HAVE_BLOCKS static void quicksortWithBlock(OFMutableArray *array, size_t left, size_t right, |
︙ | |||
380 381 382 383 384 385 386 | 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | - + | - (void)removeAllObjects { [self removeObjectsInRange: OFMakeRange(0, self.count)]; } #ifdef OF_HAVE_BLOCKS |
︙ | |||
412 413 414 415 416 417 418 | 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 | - + - + + | - (void)sort { [self sortUsingSelector: @selector(compare:) options: 0]; } - (void)sortUsingSelector: (SEL)selector |
︙ |
Modified tests/OFArrayTests.m from [03f79a56bf] to [6905bf8867].
︙ | |||
235 236 237 238 239 240 241 | 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | - + + - - + + | m[1] = [[a[0] mutableCopy] autorelease]; [m[1] addObject: @"0"]; [m[1] addObject: @"z"]; TEST(@"-[sortedArray]", [[m[1] sortedArray] isEqual: [arrayClass arrayWithObjects: @"0", @"Bar", @"Baz", @"Foo", @"z", nil]] && [[m[1] sortedArrayUsingSelector: @selector(compare:) |
︙ |
Modified tests/OFDataTests.m from [2cb3375466] to [c6fec11f60].
︙ | |||
94 95 96 97 98 99 100 | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | - + | range: OFMakeRange(0, 7)]; TEST(@"-[rangeOfData:options:range:] #1", range.location == 0 && range.length == 1) range = [immutable rangeOfData: [OFData dataWithItems: "aa" count: 1 itemSize: 2] |
︙ | |||
126 127 128 129 130 131 132 | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | - + | options: 0 range: OFMakeRange(1, 6)]) && range.location == 5 && range.length == 1) range = [immutable rangeOfData: [OFData dataWithItems: "aa" count: 1 itemSize: 2] |
︙ |