Overview
Comment: | Remove -[OFMutableArray removeNObjects:]. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
6f0ef1c5e1690ce6c146af81f52c82ca |
User & Date: | js on 2012-06-06 13:14:23 |
Other Links: | manifest | tags |
Context
2012-06-06
| ||
13:47 | Slightly change the memory management API. check-in: f7576a66ce user: js tags: trunk | |
13:14 | Remove -[OFMutableArray removeNObjects:]. check-in: 6f0ef1c5e1 user: js tags: trunk | |
13:09 | Rework OFDataArray API. check-in: d5ddb2cb48 user: js tags: trunk | |
Changes
Modified src/OFMutableArray.h from [7d1dea4d27] to [cef5851cfb].
︙ | |||
90 91 92 93 94 95 96 | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | - - - - - - - | /** * \brief Removes the object at the specified index. * * \param index The index of the object to remove */ - (void)removeObjectAtIndex: (size_t)index; |
︙ |
Modified src/OFMutableArray.m from [9461a9b182] to [2fdb683912].
︙ | |||
261 262 263 264 265 266 267 | 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | - - - - - - - + + + - + - + | [self removeObjectAtIndex: i]; return; } } } |
︙ |
Modified src/OFMutableArray_adjacent.m from [168c402c93] to [50b79cf523].
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - - | #import "OFDataArray.h" #import "OFAutoreleasePool.h" #import "OFEnumerationMutationException.h" #import "OFInvalidArgumentException.h" #import "OFOutOfRangeException.h" |
︙ | |||
143 144 145 146 147 148 149 | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | - - - - - - - - - - - - - - - - - - - - - - - - | id object = [self objectAtIndex: index]; [array removeItemAtIndex: index]; [object release]; mutations++; } |
︙ |
Modified tests/OFArrayTests.m from [1073eae76a] to [550ae86871].
︙ | |||
119 120 121 122 123 124 125 | 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | - - - - - | TEST(@"-[removeObject:]", R([m[0] removeObject: c_ary[0]]) && [m[0] count] == 2) TEST(@"-[removeObjectIdenticalTo:]", R([m[0] removeObjectIdenticalTo: c_ary[2]]) && [m[0] count] == 1) |
︙ | |||
157 158 159 160 161 162 163 | 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | - - + + + | TEST(@"-[sortedArray]", [[m[1] sortedArray] isEqual: ([OFArray arrayWithObjects: @"0", @"Bar", @"Baz", @"Foo", @"z", nil])]) EXPECT_EXCEPTION(@"Detect out of range in -[objectAtIndex:]", OFOutOfRangeException, [a[0] objectAtIndex: [a[0] count]]) |
︙ | |||
230 231 232 233 234 235 236 | 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | - + | } } @catch (OFEnumerationMutationException *e) { ok = YES; } TEST(@"Detection of mutation during Fast Enumeration", ok) |
︙ |