Differences From Artifact [1abd78bce4]:
- File
src/OFArray_adjacentSubarray.m
— part of check-in
[2a27cf3000]
at
2016-01-03 00:41:26
on branch trunk
— Update copyright
While at it, also update the mail address. (user: js, size: 1587) [annotate] [blame] [check-ins using] [more...]
To Artifact [a1caaaae82]:
- File src/OFArray_adjacentSubarray.m — part of check-in [e0b9167693] at 2016-02-21 15:37:42 on branch trunk — Make use of C99-style for loops (user: js, size: 1579) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
26 27 28 29 30 31 32 | return [_array objects] + _range.location; } - (bool)isEqual: (id)object { OFArray *otherArray; id const *objects, *otherObjects; | < | < | | 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 | return [_array objects] + _range.location; } - (bool)isEqual: (id)object { OFArray *otherArray; id const *objects, *otherObjects; if (![object isKindOfClass: [OFArray_adjacent class]] && ![object isKindOfClass: [OFMutableArray_adjacent class]]) return [super isEqual: object]; otherArray = object; if (_range.length != [otherArray count]) return false; objects = [self objects]; otherObjects = [otherArray objects]; for (size_t i = 0; i < _range.length; i++) if (![objects[i] isEqual: otherObjects[i]]) return false; return true; } #ifdef OF_HAVE_BLOCKS - (void)enumerateObjectsUsingBlock: (of_array_enumeration_block_t)block { id const *objects = [self objects]; bool stop = false; for (size_t i = 0; i < _range.length && !stop; i++) block(objects[i], i, &stop); } #endif @end |