Differences From Artifact [bf40b440c5]:
- File
src/OFArray_subarray.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: 2488) [annotate] [blame] [check-ins using]
To Artifact [b087bc3ca0]:
- File
src/OFArray_subarray.m
— part of check-in
[4af49a13c3]
at
2017-05-07 20:10:13
on branch trunk
— Small code style change
Casts are now written like types in variable declarations. (user: js, size: 2492) [annotate] [blame] [check-ins using]
| ︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | - + - + | #include "config.h" #import "OFArray_subarray.h" #import "OFOutOfRangeException.h" @implementation OFArray_subarray |
| ︙ | |||
61 62 63 64 65 66 67 | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | - + |
{
if (index >= _range.length)
@throw [OFOutOfRangeException exception];
return [_array objectAtIndex: index + _range.location];
}
|
| ︙ | |||
104 105 106 107 108 109 110 | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | - + | if (index >= _range.length) return OF_NOT_FOUND; return index; } |