Overview
Comment: | Simplify -[OFDictionary all{Keys,Objects}].
This is possible now since +[OFArray arrayWithCapacity:] has been added. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
bff98a624480f19d6ac2da683fbd3bf0 |
User & Date: | js on 2013-04-09 21:37:13 |
Other Links: | manifest | tags |
Context
2013-04-09
| ||
22:09 | Fix incomplete of_char16_t migration. check-in: 8fe08864f8 user: js tags: trunk | |
21:37 | Simplify -[OFDictionary all{Keys,Objects}]. check-in: bff98a6244 user: js tags: trunk | |
21:35 | Add -[OFEnumerator allObjects]. check-in: 7f0e327251 user: js tags: trunk | |
Changes
Modified src/OFDictionary.m from [b5ab4c9ae4] to [ff91f774b0].
︙ | ︙ | |||
407 408 409 410 411 412 413 414 | objc_autoreleasePoolPop(pool); return false; } - (OFArray*)allKeys { void *pool = objc_autoreleasePoolPush(); | > < < < | < < | < > < < < < < < < > < < < | < < | < > < < < < < < < | 407 408 409 410 411 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 439 440 441 442 443 444 445 446 447 448 449 | objc_autoreleasePoolPop(pool); return false; } - (OFArray*)allKeys { OFMutableArray *ret = [OFMutableArray arrayWithCapacity: [self count]]; void *pool = objc_autoreleasePoolPush(); OFEnumerator *enumerator = [self keyEnumerator]; id key; while ((key = [enumerator nextObject]) != nil) [ret addObject: key]; [ret makeImmutable]; objc_autoreleasePoolPop(pool); return ret; } - (OFArray*)allObjects { OFMutableArray *ret = [OFMutableArray arrayWithCapacity: [self count]]; void *pool = objc_autoreleasePoolPush(); OFEnumerator *enumerator = [self objectEnumerator]; id object; while ((object = [enumerator nextObject]) != nil) [ret addObject: object]; [ret makeImmutable]; objc_autoreleasePoolPop(pool); return ret; } - (OFEnumerator*)objectEnumerator { [self doesNotRecognizeSelector: _cmd]; abort(); |
︙ | ︙ |