Differences From Artifact [2880b7d607]:
- File src/OFPair.m — part of check-in [52011fbfd6] at 2017-09-26 21:53:44 on branch trunk — Many nullability fixes (user: js, size: 2154) [annotate] [blame] [check-ins using]
To Artifact [e5cb38f069]:
- File
src/OFPair.m
— part of check-in
[2f4e0df8be]
at
2017-10-17 00:33:37
on branch trunk
— Do not use implicit method return types
Instead, explicitly declare them, as OF_ASSUME_NONNULL_{BEGIN,END} does
not apply to implicit return types. This means that after this commit,
all init methods have a nonnull return type, as they should have. (user: js, size: 2183) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
23 24 25 26 27 28 29 | + (instancetype)pairWithFirstObject: (id)firstObject secondObject: (id)secondObject { return [[[self alloc] initWithFirstObject: firstObject secondObject: secondObject] autorelease]; } | | | | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | + (instancetype)pairWithFirstObject: (id)firstObject secondObject: (id)secondObject { return [[[self alloc] initWithFirstObject: firstObject secondObject: secondObject] autorelease]; } - (instancetype)initWithFirstObject: (id)firstObject secondObject: (id)secondObject { self = [super init]; @try { _firstObject = [firstObject retain]; _secondObject = [secondObject retain]; } @catch (id e) { |
︙ | ︙ | |||
91 92 93 94 95 96 97 | OF_HASH_ADD_HASH(hash, [_secondObject hash]); OF_HASH_FINALIZE(hash); return hash; } | | | | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | OF_HASH_ADD_HASH(hash, [_secondObject hash]); OF_HASH_FINALIZE(hash); return hash; } - (id)copy { return [self retain]; } - (id)mutableCopy { return [[OFMutablePair alloc] initWithFirstObject: _firstObject secondObject: _secondObject]; } - (OFString *)description { return [OFString stringWithFormat: @"<<%@, %@>>", _firstObject, _secondObject]; } @end |