Differences From Artifact [6ee14e3c8a]:
- File
src/OFMutableArray_adjacent.m
— part of check-in
[44f45c2e35]
at
2017-01-09 17:36:36
on branch trunk
— Update copyright
Forgot to add 2017, even though I already did quite some changes in
2017. (user: js, size: 7667) [annotate] [blame] [check-ins using]
To Artifact [55b87bb47c]:
- File
src/OFMutableArray_adjacent.m
— part of check-in
[7fec2ef57e]
at
2017-05-01 13:37:26
on branch trunk
— Add tests for generic OFArray / OFMutableArray
These are usually not used, as OFArray_adjacent and
OFMutableArray_adjacent are used instead. However, they are used if
someone creates their own subclass of OFArray / OFMutableArray. As they
are rarely used in production, it is important to run all tests on them. (user: js, size: 7694) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
231 232 233 234 235 236 237 |
- (void)removeObjectsInRange: (of_range_t)range
{
id *objects = [_array items], *copy;
size_t count = [_array count];
if (range.length > SIZE_MAX - range.location ||
| | | 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
- (void)removeObjectsInRange: (of_range_t)range
{
id *objects = [_array items], *copy;
size_t count = [_array count];
if (range.length > SIZE_MAX - range.location ||
range.location >= count || range.length > count - range.location)
@throw [OFOutOfRangeException exception];
copy = [self allocMemoryWithSize: sizeof(*copy)
count: range.length];
memcpy(copy, objects + range.location, range.length * sizeof(id));
@try {
|
| ︙ | ︙ |