Overview
Comment: | Add more designated initializers |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
abc315cc899505a7963703f51297dfc7 |
User & Date: | js on 2023-08-17 14:53:08 |
Other Links: | manifest | tags |
Context
2023-08-22
| ||
15:19 | -[fileExistsAtPath:]: Don't require S_ISREG check-in: 140b7d93e3 user: js tags: trunk | |
2023-08-17
| ||
14:53 | Add more designated initializers check-in: abc315cc89 user: js tags: trunk | |
14:30 | OFString: Add designated initializer check-in: 03339575cb user: js tags: trunk | |
Changes
Modified src/OFMatrix4x4.h from [c303f1010a] to [0e103db2bb].
︙ | ︙ | |||
46 47 48 49 50 51 52 53 54 55 56 57 58 | * @brief Creates a new 4x4 matrix with the specified values. * * @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; /** * @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 */ | > > | > | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | * @brief Creates a new 4x4 matrix with the specified values. * * @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 OF_DESIGNATED_INITIALIZER; /** * @brief Mulitplies the receiver with the specified matrix on the left side * and the receiver on the right side. * * @param matrix The matrix to multiply the receiver with */ |
︙ | ︙ |
Modified src/OFMatrix4x4.m from [77a89afbe5] to [7871015766].
︙ | ︙ | |||
33 34 35 36 37 38 39 40 41 42 43 44 45 46 | initWithValues: identityValues] autorelease]; } + (instancetype)matrixWithValues: (const float [4][4])values { return [[[self alloc] initWithValues: values] autorelease]; } - (instancetype)initWithValues: (const float [4][4])values { self = [super init]; memcpy(_values, values, sizeof(_values)); | > > > > > | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | initWithValues: identityValues] autorelease]; } + (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]; memcpy(_values, values, sizeof(_values)); |
︙ | ︙ |
Modified src/OFMethodSignature.h from [074e9c24c2] to [a9827bf762].
︙ | ︙ | |||
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | * * @param types The ObjC types of the method * @return A new, autoreleased OFMethodSignature * @throw OFInvalidFormatException The type encoding is invalid */ + (instancetype)signatureWithObjCTypes: (const char *)types; /** * @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 */ | > > | > | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | * * @param types The ObjC types of the method * @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 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 * @return The ObjC type for the argument at the specified index */ |
︙ | ︙ |
Modified src/OFMethodSignature.m from [e8f9b47dc1] to [a2e3c59f99].
︙ | ︙ | |||
587 588 589 590 591 592 593 594 595 596 597 598 599 600 | } @implementation OFMethodSignature + (instancetype)signatureWithObjCTypes: (const char*)types { return [[[self alloc] initWithObjCTypes: types] autorelease]; } - (instancetype)initWithObjCTypes: (const char *)types { self = [super init]; @try { size_t length; | > > > > > | 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 | } @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]; @try { size_t length; |
︙ | ︙ |