@@ -255,12 +255,12 @@ { if (SIZE_MAX - count < 1) @throw [OFOutOfRangeException exceptionWithClass: isa]; data = [self resizeMemory: data - toNItems: count + 1 - ofSize: itemSize]; + itemSize: itemSize + count: count + 1]; memcpy(data + count * itemSize, item, itemSize); count++; } @@ -278,12 +278,12 @@ { if (nItems > SIZE_MAX - count) @throw [OFOutOfRangeException exceptionWithClass: isa]; data = [self resizeMemory: data - toNItems: count + nItems - ofSize: itemSize]; + itemSize: itemSize + count: count + nItems]; memcpy(data + count * itemSize, cArray, nItems * itemSize); count += nItems; } @@ -293,12 +293,12 @@ { if (nItems > SIZE_MAX - count || index > count) @throw [OFOutOfRangeException exceptionWithClass: isa]; data = [self resizeMemory: data - toNItems: count + nItems - ofSize: itemSize]; + itemSize: itemSize + count: count + nItems]; memmove(data + (index + nItems) * itemSize, data + index * itemSize, (count - index) * itemSize); memcpy(data + index * itemSize, cArray, nItems * itemSize); @@ -320,12 +320,12 @@ (count - range.start - range.length) * itemSize); count -= range.length; @try { data = [self resizeMemory: data - toNItems: count - ofSize: itemSize]; + itemSize: itemSize + count: count]; } @catch (OFOutOfMemoryException *e) { /* We don't really care, as we only made it smaller */ } } @@ -335,12 +335,12 @@ @throw [OFOutOfRangeException exceptionWithClass: isa]; count--; @try { data = [self resizeMemory: data - toNItems: count - ofSize: itemSize]; + itemSize: itemSize + count: count]; } @catch (OFOutOfMemoryException *e) { /* We don't care, as we only made it smaller */ } } @@ -567,12 +567,11 @@ newSize = (count * itemSize + lastPageByte) & ~lastPageByte; if (size != newSize) { @try { data = [self resizeMemory: data - toNItems: count - ofSize: newSize]; + toSize: newSize]; } @catch (OFOutOfMemoryException *e) { /* We don't care, as we only made it smaller */ } size = newSize;