Differences From Artifact [1999b771ee]:
- File src/OFMutableAdjacentArray.m — part of check-in [ca3e874157] at 2020-06-24 20:53:41 on branch trunk — Fix missing cast (user: js, size: 7816) [annotate] [blame] [check-ins using] [more...]
To Artifact [73c0aec03a]:
- File
src/OFMutableAdjacentArray.m
— part of check-in
[0ddaac3f5b]
at
2020-11-05 00:24:29
on branch trunk
— Avoid -[allocMemoryWithSize:] for temporary memory
-[allocMemoryWithSize:] has book keeping overhead that is unnecessary
for temporary memory. (user: js, size: 7773) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
239 240 241 242 243 244 245 | size_t count = _array.count; id *copy; if (range.length > SIZE_MAX - range.location || range.location >= count || range.length > count - range.location) @throw [OFOutOfRangeException exception]; | < | | | 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | size_t count = _array.count; id *copy; if (range.length > SIZE_MAX - range.location || range.location >= count || range.length > count - range.location) @throw [OFOutOfRangeException exception]; copy = of_malloc(range.length, sizeof(*copy)); memcpy(copy, objects + range.location, range.length * sizeof(id)); @try { [_array removeItemsInRange: range]; _mutations++; for (size_t i = 0; i < range.length; i++) [copy[i] release]; } @finally { free(copy); } } - (void)removeLastObject { #ifndef __clang_analyzer__ size_t count = _array.count; |
︙ | ︙ |