@@ -101,26 +101,26 @@ initWithKeyFunctions: keyFunctions objectFunctions: objectFunctions capacity: capacity] autorelease]; } -- init +- (instancetype)init { OF_INVALID_INIT_METHOD } -- initWithKeyFunctions: (of_map_table_functions_t)keyFunctions - objectFunctions: (of_map_table_functions_t)objectFunctions +- (instancetype)initWithKeyFunctions: (of_map_table_functions_t)keyFunctions + objectFunctions: (of_map_table_functions_t)objectFunctions { return [self initWithKeyFunctions: keyFunctions objectFunctions: objectFunctions capacity: 0]; } -- initWithKeyFunctions: (of_map_table_functions_t)keyFunctions - objectFunctions: (of_map_table_functions_t)objectFunctions - capacity: (size_t)capacity +- (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; @@ -233,11 +233,11 @@ } return hash; } -- copy +- (id)copy { OFMapTable *copy = [[OFMapTable alloc] initWithKeyFunctions: _keyFunctions objectFunctions: _objectFunctions capacity: _capacity]; @@ -659,11 +659,11 @@ } #endif @end @implementation OFMapTableEnumerator -- init +- (instancetype)init { OF_INVALID_INIT_METHOD } - (instancetype)of_initWithMapTable: (OFMapTable *)mapTable @@ -737,12 +737,12 @@ return NULL; } @end @implementation OFMapTable_EnumeratorWrapper -- initWithEnumerator: (OFMapTableEnumerator *)enumerator - object: (id)object +- (instancetype)initWithEnumerator: (OFMapTableEnumerator *)enumerator + object: (id)object { self = [super init]; _enumerator = [enumerator retain]; _object = [object retain];