@@ -29,26 +29,26 @@ @interface OFMutableSet_placeholder: OFMutableSet @end @implementation OFMutableSet_placeholder -- init +- (instancetype)init { return (id)[[OFMutableSet_hashtable alloc] init]; } -- initWithSet: (OFSet *)set +- (instancetype)initWithSet: (OFSet *)set { return (id)[[OFMutableSet_hashtable alloc] initWithSet: set]; } -- initWithArray: (OFArray *)array +- (instancetype)initWithArray: (OFArray *)array { return (id)[[OFMutableSet_hashtable alloc] initWithArray: array]; } -- initWithObjects: (id)firstObject, ... +- (instancetype)initWithObjects: (id)firstObject, ... { id ret; va_list arguments; va_start(arguments, firstObject); @@ -57,41 +57,41 @@ va_end(arguments); return ret; } -- initWithObjects: (id const *)objects - count: (size_t)count +- (instancetype)initWithObjects: (id const *)objects + count: (size_t)count { return (id)[[OFMutableSet_hashtable alloc] initWithObjects: objects count: count]; } -- initWithObject: (id)firstObject - arguments: (va_list)arguments +- (instancetype)initWithObject: (id)firstObject + arguments: (va_list)arguments { return (id)[[OFMutableSet_hashtable alloc] initWithObject: firstObject arguments: arguments]; } -- initWithSerialization: (OFXMLElement *)element +- (instancetype)initWithSerialization: (OFXMLElement *)element { return (id)[[OFMutableSet_hashtable alloc] initWithSerialization: element]; } -- initWithCapacity: (size_t)capacity +- (instancetype)initWithCapacity: (size_t)capacity { return (id)[[OFMutableSet_hashtable alloc] initWithCapacity: capacity]; } -- retain +- (instancetype)retain { return self; } -- autorelease +- (instancetype)autorelease { return self; } - (void)release @@ -109,11 +109,11 @@ { if (self == [OFMutableSet class]) placeholder.isa = [OFMutableSet_placeholder class]; } -+ alloc ++ (instancetype)alloc { if (self == [OFMutableSet class]) return (id)&placeholder; return [super alloc]; @@ -122,11 +122,11 @@ + (instancetype)setWithCapacity: (size_t)capacity { return [[[self alloc] initWithCapacity: capacity] autorelease]; } -- init +- (instancetype)init { if (object_getClass(self) == [OFMutableSet class]) { @try { [self doesNotRecognizeSelector: _cmd]; abort(); @@ -137,11 +137,11 @@ } return [super init]; } -- initWithCapacity: (size_t)capacity +- (instancetype)initWithCapacity: (size_t)capacity { OF_INVALID_INIT_METHOD } - (void)addObject: (id)object