78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
@throw [OFOutOfRangeException newWithClass: isa];
return data + index * itemsize;
}
- (void*)lastItem
{
return data + (count - 1) * itemsize;
}
- addItem: (void*)item
{
if (SIZE_MAX - count < 1)
@throw [OFOutOfRangeException newWithClass: isa];
|
>
>
>
|
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
@throw [OFOutOfRangeException newWithClass: isa];
return data + index * itemsize;
}
- (void*)lastItem
{
if (data == NULL || count == 0)
return NULL;
return data + (count - 1) * itemsize;
}
- addItem: (void*)item
{
if (SIZE_MAX - count < 1)
@throw [OFOutOfRangeException newWithClass: isa];
|