Differences From Artifact [28440d417d]:
- File src/OFXMLElement.m — part of check-in [c8f7b90082] at 2017-07-22 20:50:27 on branch trunk — Split OFDataArray into OFData and OFMutableData (user: js, size: 26102) [annotate] [blame] [check-ins using] [more...]
To Artifact [ac132aa128]:
- File
src/OFXMLElement.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: 26232) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
125 126 127 128 129 130 131 | #ifdef OF_HAVE_FILES + (instancetype)elementWithFile: (OFString *)path { return [[[self alloc] initWithFile: path] autorelease]; } #endif | | | | | | | | | | | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | #ifdef OF_HAVE_FILES + (instancetype)elementWithFile: (OFString *)path { return [[[self alloc] initWithFile: path] autorelease]; } #endif - (instancetype)init { OF_INVALID_INIT_METHOD } - (instancetype)initWithName: (OFString *)name { return [self initWithName: name namespace: nil stringValue: nil]; } - (instancetype)initWithName: (OFString *)name stringValue: (OFString *)stringValue { return [self initWithName: name namespace: nil stringValue: stringValue]; } - (instancetype)initWithName: (OFString *)name namespace: (OFString *)namespace { return [self initWithName: name namespace: namespace stringValue: nil]; } - (instancetype)initWithName: (OFString *)name namespace: (OFString *)namespace stringValue: (OFString *)stringValue { self = [super of_init]; @try { if (name == nil) @throw [OFInvalidArgumentException exception]; |
︙ | ︙ | |||
181 182 183 184 185 186 187 | [self release]; @throw e; } return self; } | | | 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | [self release]; @throw e; } return self; } - (instancetype)initWithElement: (OFXMLElement *)element { self = [super of_init]; @try { if (element == nil) @throw [OFInvalidArgumentException exception]; |
︙ | ︙ | |||
203 204 205 206 207 208 209 | [self release]; @throw e; } return self; } | | | 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | [self release]; @throw e; } return self; } - (instancetype)initWithXMLString: (OFString *)string { void *pool; OFXMLParser *parser; OFXMLElementBuilder *builder; OFXMLElement_OFXMLElementBuilderDelegate *delegate; [self release]; |
︙ | ︙ | |||
238 239 240 241 242 243 244 | objc_autoreleasePoolPop(pool); return self; } #ifdef OF_HAVE_FILES | | | 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | objc_autoreleasePoolPop(pool); return self; } #ifdef OF_HAVE_FILES - (instancetype)initWithFile: (OFString *)path { void *pool; OFXMLParser *parser; OFXMLElementBuilder *builder; OFXMLElement_OFXMLElementBuilderDelegate *delegate; [self release]; |
︙ | ︙ | |||
270 271 272 273 274 275 276 | objc_autoreleasePoolPop(pool); return self; } #endif | | | 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | objc_autoreleasePoolPop(pool); return self; } #endif - (instancetype)initWithSerialization: (OFXMLElement *)element { self = [super of_init]; @try { void *pool = objc_autoreleasePoolPush(); OFXMLElement *attributesElement, *namespacesElement; OFXMLElement *childrenElement; |
︙ | ︙ | |||
1073 1074 1075 1076 1077 1078 1079 | OF_HASH_ADD_HASH(hash, [_children hash]); OF_HASH_FINALIZE(hash); return hash; } | | | 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 | OF_HASH_ADD_HASH(hash, [_children hash]); OF_HASH_FINALIZE(hash); return hash; } - (id)copy { return [[[self class] alloc] initWithElement: self]; } @end |