287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
|
count += nItems;
}
- (void)addNItems: (size_t)nItems
fromCArray: (const void*)cArray
atIndex: (size_t)index
{
if (nItems > SIZE_MAX - count)
@throw [OFOutOfRangeException exceptionWithClass: isa];
data = [self resizeMemory: data
toNItems: count + nItems
ofSize: itemSize];
memmove(data + (index + nItems) * itemSize, data + index * itemSize,
|
|
|
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
|
count += nItems;
}
- (void)addNItems: (size_t)nItems
fromCArray: (const void*)cArray
atIndex: (size_t)index
{
if (nItems > SIZE_MAX - count || index > count)
@throw [OFOutOfRangeException exceptionWithClass: isa];
data = [self resizeMemory: data
toNItems: count + nItems
ofSize: itemSize];
memmove(data + (index + nItems) * itemSize, data + index * itemSize,
|