75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
- (void*)itemAtIndex: (size_t)index
{
if (index >= count)
@throw [OFOutOfRangeException newWithClass: isa];
return data + index * itemsize;
}
- (void*)lastItem
{
if (data == NULL || count == 0)
return NULL;
return data + (count - 1) * itemsize;
|
>
>
>
>
>
>
>
>
|
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
- (void*)itemAtIndex: (size_t)index
{
if (index >= count)
@throw [OFOutOfRangeException newWithClass: isa];
return data + index * itemsize;
}
- (void*)firstItem
{
if (data == NULL || count == 0)
return NULL;
return data;
}
- (void*)lastItem
{
if (data == NULL || count == 0)
return NULL;
return data + (count - 1) * itemsize;
|