Differences From Artifact [2c59c12f0d]:
- File src/OFMapTable.m — part of check-in [00476e4430] at 2017-10-11 20:53:10 on branch trunk — Fix shadowed variables and enable -Wshadow (user: js, size: 16922) [annotate] [blame] [check-ins using]
To Artifact [18b269539e]:
- File
src/OFMapTable.m
— part of check-in
[2f4e0df8be]
at
2017-10-17 00:33:37
on branch trunk
— Do not use implicit method return types
Instead, explicitly declare them, as OF_ASSUME_NONNULL_{BEGIN,END} does
not apply to implicit return types. This means that after this commit,
all init methods have a nonnull return type, as they should have. (user: js, size: 16996) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
99 100 101 102 103 104 105 | { return [[[self alloc] initWithKeyFunctions: keyFunctions objectFunctions: objectFunctions capacity: capacity] autorelease]; } | | | | | | | | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | { return [[[self alloc] initWithKeyFunctions: keyFunctions objectFunctions: objectFunctions capacity: capacity] autorelease]; } - (instancetype)init { OF_INVALID_INIT_METHOD } - (instancetype)initWithKeyFunctions: (of_map_table_functions_t)keyFunctions objectFunctions: (of_map_table_functions_t)objectFunctions { return [self initWithKeyFunctions: keyFunctions objectFunctions: objectFunctions capacity: 0]; } - (instancetype)initWithKeyFunctions: (of_map_table_functions_t)keyFunctions objectFunctions: (of_map_table_functions_t)objectFunctions capacity: (size_t)capacity { self = [super init]; @try { _keyFunctions = keyFunctions; _objectFunctions = objectFunctions; |
︙ | ︙ | |||
231 232 233 234 235 236 237 | hash += _objectFunctions.hash(_buckets[i]->object); } } return hash; } | | | 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | hash += _objectFunctions.hash(_buckets[i]->object); } } return hash; } - (id)copy { OFMapTable *copy = [[OFMapTable alloc] initWithKeyFunctions: _keyFunctions objectFunctions: _objectFunctions capacity: _capacity]; @try { |
︙ | ︙ | |||
657 658 659 660 661 662 663 | } } } #endif @end @implementation OFMapTableEnumerator | | | 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 | } } } #endif @end @implementation OFMapTableEnumerator - (instancetype)init { OF_INVALID_INIT_METHOD } - (instancetype)of_initWithMapTable: (OFMapTable *)mapTable buckets: (struct of_map_table_bucket **)buckets capacity: (uint32_t)capacity |
︙ | ︙ | |||
735 736 737 738 739 740 741 | return &_buckets[_position++]->object; else return NULL; } @end @implementation OFMapTable_EnumeratorWrapper | | | | 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 | return &_buckets[_position++]->object; else return NULL; } @end @implementation OFMapTable_EnumeratorWrapper - (instancetype)initWithEnumerator: (OFMapTableEnumerator *)enumerator object: (id)object { self = [super init]; _enumerator = [enumerator retain]; _object = [object retain]; return self; |
︙ | ︙ |