Differences From Artifact [0205b4710b]:
- File src/OFCountedSet_hashtable.m — part of check-in [8823a4df67] at 2017-08-19 08:24:40 on branch trunk — Add -[OFMutableSet removeAllObjects] (user: js, size: 4726) [annotate] [blame] [check-ins using]
To Artifact [534eb57128]:
- File
src/OFCountedSet_hashtable.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: 4796) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
32 33 34 35 36 37 38 | @implementation OFCountedSet_hashtable + (void)initialize { if (self == [OFCountedSet_hashtable class]) [self inheritMethodsFromClass: [OFMutableSet_hashtable class]]; } | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | @implementation OFCountedSet_hashtable + (void)initialize { if (self == [OFCountedSet_hashtable class]) [self inheritMethodsFromClass: [OFMutableSet_hashtable class]]; } - (instancetype)initWithSet: (OFSet *)set { self = [self init]; @try { void *pool = objc_autoreleasePoolPush(); if ([set isKindOfClass: [OFCountedSet class]]) { |
︙ | ︙ | |||
62 63 64 65 66 67 68 | [self release]; @throw e; } return self; } | | | | | | | | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | [self release]; @throw e; } return self; } - (instancetype)initWithArray: (OFArray *)array { self = [self init]; @try { id const *objects = [array objects]; size_t count = [array count]; for (size_t i = 0; i < count; i++) [self addObject: objects[i]]; } @catch (id e) { [self release]; @throw e; } return self; } - (instancetype)initWithObjects: (id const *)objects count: (size_t)count { self = [self init]; @try { for (size_t i = 0; i < count; i++) [self addObject: objects[i]]; } @catch (id e) { [self release]; @throw e; } return self; } - (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments { self = [self init]; @try { id object; [self addObject: firstObject]; while ((object = va_arg(arguments, id)) != nil) [self addObject: object]; } @catch (id e) { [self release]; @throw e; } return self; } - (instancetype)initWithSerialization: (OFXMLElement *)element { self = [self init]; @try { void *pool = objc_autoreleasePoolPush(); if (![[element name] isEqual: @"OFCountedSet"] || |
︙ | ︙ |