@@ -27,10 +27,16 @@ @interface OFPlaceholderMutableSet: OFMutableSet @end @implementation OFPlaceholderMutableSet +#ifdef __clang__ +/* We intentionally don't call into super, so silence the warning. */ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wunknown-pragmas" +# pragma clang diagnostic ignored "-Wobjc-designated-initializers" +#endif - (instancetype)init { return (id)[[OFConcreteMutableSet alloc] init]; } @@ -71,10 +77,13 @@ - (instancetype)initWithCapacity: (size_t)capacity { return (id)[[OFConcreteMutableSet alloc] initWithCapacity: capacity]; } +#ifdef __clang__ +# pragma clang diagnostic pop +#endif OF_SINGLETON_METHODS @end @implementation OFMutableSet @@ -95,15 +104,34 @@ + (instancetype)setWithCapacity: (size_t)capacity { return [[[self alloc] initWithCapacity: capacity] autorelease]; } + +- (instancetype)init +{ + return [super init]; +} + +#ifdef __clang__ +/* We intentionally don't call into super, so silence the warning. */ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wunknown-pragmas" +# pragma clang diagnostic ignored "-Wobjc-designated-initializers" +#endif +- (instancetype)initWithObjects: (id const *)objects count: (size_t)count +{ + OF_INVALID_INIT_METHOD +} - (instancetype)initWithCapacity: (size_t)capacity { OF_INVALID_INIT_METHOD } +#ifdef __clang__ +# pragma clang diagnostic pop +#endif - (id)copy { return [[OFSet alloc] initWithSet: self]; }