@@ -30,26 +30,26 @@ @interface OFCountedSet_placeholder: OFCountedSet @end @implementation OFCountedSet_placeholder -- init +- (instancetype)init { return (id)[[OFCountedSet_hashtable alloc] init]; } -- initWithSet: (OFSet *)set +- (instancetype)initWithSet: (OFSet *)set { return (id)[[OFCountedSet_hashtable alloc] initWithSet: set]; } -- initWithArray: (OFArray *)array +- (instancetype)initWithArray: (OFArray *)array { return (id)[[OFCountedSet_hashtable alloc] initWithArray: array]; } -- initWithObjects: (id)firstObject, ... +- (instancetype)initWithObjects: (id)firstObject, ... { id ret; va_list arguments; va_start(arguments, firstObject); @@ -58,36 +58,36 @@ va_end(arguments); return ret; } -- initWithObjects: (id const *)objects - count: (size_t)count +- (instancetype)initWithObjects: (id const *)objects + count: (size_t)count { return (id)[[OFCountedSet_hashtable alloc] initWithObjects: objects count: count]; } -- initWithObject: (id)firstObject - arguments: (va_list)arguments +- (instancetype)initWithObject: (id)firstObject + arguments: (va_list)arguments { return (id)[[OFCountedSet_hashtable alloc] initWithObject: firstObject arguments: arguments]; } -- initWithSerialization: (OFXMLElement *)element +- (instancetype)initWithSerialization: (OFXMLElement *)element { return (id)[[OFCountedSet_hashtable alloc] initWithSerialization: element]; } -- retain +- (instancetype)retain { return self; } -- autorelease +- (instancetype)autorelease { return self; } - (void)release @@ -105,19 +105,19 @@ { if (self == [OFCountedSet class]) placeholder.isa = [OFCountedSet_placeholder class]; } -+ alloc ++ (instancetype)alloc { if (self == [OFCountedSet class]) return (id)&placeholder; return [super alloc]; } -- init +- (instancetype)init { if (object_getClass(self) == [OFCountedSet class]) { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { @@ -170,16 +170,16 @@ objc_autoreleasePoolPop(pool); return ret; } -- copy +- (id)copy { return [[OFCountedSet alloc] initWithSet: self]; } -- mutableCopy +- (id)mutableCopy { return [[OFCountedSet alloc] initWithSet: self]; } - (OFXMLElement *)XMLElementBySerializing