Differences From Artifact [45617fcf1b]:
- File src/OFArray_adjacent.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: 7033) [annotate] [blame] [check-ins using]
To Artifact [c6a82f0db4]:
- File
src/OFArray_adjacent.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: 7117) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
26 27 28 29 30 31 32 | #import "OFXMLElement.h" #import "OFEnumerationMutationException.h" #import "OFInvalidArgumentException.h" #import "OFOutOfRangeException.h" @implementation OFArray_adjacent | | | | | | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | #import "OFXMLElement.h" #import "OFEnumerationMutationException.h" #import "OFInvalidArgumentException.h" #import "OFOutOfRangeException.h" @implementation OFArray_adjacent - (instancetype)init { self = [super init]; @try { _array = [[OFMutableData alloc] initWithItemSize: sizeof(id)]; } @catch (id e) { [self release]; @throw e; } return self; } - (instancetype)initWithObject: (id)object { self = [self init]; @try { if (object == nil) @throw [OFInvalidArgumentException exception]; [_array addItem: &object]; [object retain]; } @catch (id e) { [self release]; @throw e; } return self; } - (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments { self = [self init]; @try { id object; [_array addItem: &firstObject]; |
︙ | ︙ | |||
81 82 83 84 85 86 87 | [self release]; @throw e; } return self; } | | | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | [self release]; @throw e; } return self; } - (instancetype)initWithArray: (OFArray *)array { id const *objects; size_t count; self = [super init]; if (array == nil) |
︙ | ︙ | |||
123 124 125 126 127 128 129 | [self release]; @throw e; } return self; } | | | | 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | [self release]; @throw e; } return self; } - (instancetype)initWithObjects: (id const *)objects count: (size_t)count { self = [self init]; @try { bool ok = true; for (size_t i = 0; i < count; i++) { |
︙ | ︙ | |||
154 155 156 157 158 159 160 | [self release]; @throw e; } return self; } | | | 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | [self release]; @throw e; } return self; } - (instancetype)initWithSerialization: (OFXMLElement *)element { self = [self init]; @try { void *pool = objc_autoreleasePoolPush(); if ((![[element name] isEqual: @"OFArray"] && |
︙ | ︙ |