Index: src/OFMatrix4x4.h ================================================================== --- src/OFMatrix4x4.h +++ src/OFMatrix4x4.h @@ -48,17 +48,20 @@ * @param values A 2D array of 4x4 floats in row-major format * @return A new, autoreleased OFMatrix4x4 */ + (instancetype)matrixWithValues: (const float [_Nonnull 4][4])values; +- (instancetype)init OF_UNAVAILABLE; + /** * @brief Initializes an already allocated 4x4 matrix with the specified values. * * @param values A 2D array of 4x4 floats in row-major format * @return An initialized OFMatrix4x4 */ -- (instancetype)initWithValues: (const float [_Nonnull 4][4])values; +- (instancetype)initWithValues: (const float [_Nonnull 4][4])values + OF_DESIGNATED_INITIALIZER; /** * @brief Mulitplies the receiver with the specified matrix on the left side * and the receiver on the right side. * Index: src/OFMatrix4x4.m ================================================================== --- src/OFMatrix4x4.m +++ src/OFMatrix4x4.m @@ -35,10 +35,15 @@ + (instancetype)matrixWithValues: (const float [4][4])values { return [[[self alloc] initWithValues: values] autorelease]; } + +- (instancetype)init +{ + OF_INVALID_INIT_METHOD +} - (instancetype)initWithValues: (const float [4][4])values { self = [super init]; Index: src/OFMethodSignature.h ================================================================== --- src/OFMethodSignature.h +++ src/OFMethodSignature.h @@ -55,19 +55,22 @@ * @return A new, autoreleased OFMethodSignature * @throw OFInvalidFormatException The type encoding is invalid */ + (instancetype)signatureWithObjCTypes: (const char *)types; +- (instancetype)init OF_UNAVAILABLE; + /** * @brief Initializes an already allocated OFMethodSignature with the specified * ObjC types. * * @param types The ObjC types of the method * @return An Initialized OFMethodSignature * @throw OFInvalidFormatException The type encoding is invalid */ -- (instancetype)initWithObjCTypes: (const char *)types; +- (instancetype)initWithObjCTypes: (const char *)types + OF_DESIGNATED_INITIALIZER; /** * @brief Returns the ObjC type for the argument at the specified index. * * @param index The index of the argument for which to return the ObjC type Index: src/OFMethodSignature.m ================================================================== --- src/OFMethodSignature.m +++ src/OFMethodSignature.m @@ -589,10 +589,15 @@ @implementation OFMethodSignature + (instancetype)signatureWithObjCTypes: (const char*)types { return [[[self alloc] initWithObjCTypes: types] autorelease]; } + +- (instancetype)init +{ + OF_INVALID_INIT_METHOD +} - (instancetype)initWithObjCTypes: (const char *)types { self = [super init];