Differences From Artifact [2082375f0b]:
- File src/OFURL.m — part of check-in [00476e4430] at 2017-10-11 20:53:10 on branch trunk — Fix shadowed variables and enable -Wshadow (user: js, size: 10316) [annotate] [blame] [check-ins using] [more...]
To Artifact [bc22950fc0]:
- File
src/OFURL.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: 10380) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
58 59 60 61 62 63 64 | [URL makeImmutable]; objc_autoreleasePoolPop(pool); return URL; } | | | | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | [URL makeImmutable]; objc_autoreleasePoolPop(pool); return URL; } - (instancetype)init { OF_INVALID_INIT_METHOD } - (instancetype)of_init { return [super init]; } - (instancetype)initWithString: (OFString *)string { char *UTF8String, *UTF8String2 = NULL; self = [super init]; @try { void *pool = objc_autoreleasePoolPush(); |
︙ | ︙ | |||
202 203 204 205 206 207 208 | } @finally { free(UTF8String2); } return self; } | | | | 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | } @finally { free(UTF8String2); } return self; } - (instancetype)initWithString: (OFString *)string relativeToURL: (OFURL *)URL { char *UTF8String, *UTF8String2 = NULL; if ([string containsString: @"://"]) return [self initWithString: string]; self = [super init]; |
︙ | ︙ | |||
276 277 278 279 280 281 282 | } @finally { free(UTF8String2); } return self; } | | | 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | } @finally { free(UTF8String2); } return self; } - (instancetype)initWithSerialization: (OFXMLElement *)element { @try { void *pool = objc_autoreleasePoolPush(); if (![[element name] isEqual: [self className]] || ![[element namespace] isEqual: OF_SERIALIZATION_NS]) @throw [OFInvalidArgumentException exception]; |
︙ | ︙ | |||
412 413 414 415 416 417 418 | } - (OFString *)fragment { return _fragment; } | | | | 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 | } - (OFString *)fragment { return _fragment; } - (id)copy { return [self retain]; } - (id)mutableCopy { OFMutableURL *copy = [[OFMutableURL alloc] init]; @try { [copy setScheme: _scheme]; [copy setHost: _host]; [copy setPort: _port]; |
︙ | ︙ |