Oops - missed from last commit

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4112 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1999-04-22 11:58:53 +00:00
parent 2e8a34c705
commit b45195874d

View file

@ -30,10 +30,10 @@
#endif
/* To turn assertions on, comment out the following four lines */
#ifndef NS_BLOCK_ASSERTIONS
#define NS_BLOCK_ASSERTIONS 1
#define FAST_ARRAY_BLOCKED_ASSERTIONS 1
#endif
//#ifndef NS_BLOCK_ASSERTIONS
//#define NS_BLOCK_ASSERTIONS 1
//#define FAST_ARRAY_BLOCKED_ASSERTIONS 1
//#endif
#define FAST_ARRAY_CHECK NSCAssert(array->count <= array->cap && array->old <= array->cap && array->old >= 1, NSInternalInconsistencyException)
@ -155,7 +155,7 @@ FastArrayInsertItem(FastArray array, FastArrayItem item, unsigned index)
{
FastArrayGrow(array);
}
for (i = ++array->count; i > index; i--)
for (i = array->count++; i > index; i--)
{
array->ptr[i] = array->ptr[i-1];
}
@ -173,7 +173,7 @@ FastArrayInsertItemNoRetain(FastArray array, FastArrayItem item, unsigned index)
{
FastArrayGrow(array);
}
for (i = ++array->count; i > index; i--)
for (i = array->count++; i > index; i--)
{
array->ptr[i] = array->ptr[i-1];
}
@ -257,7 +257,7 @@ FastArrayCheckSort(FastArray array, int (*sorter)())
{
unsigned i;
for (i = 1; i < FastArrayCount(array); i++)
for (i = 1; i < array->count; i++)
{
NSCAssert(((*sorter)(array->ptr[i-1], array->ptr[i]) <= 0),
NSInvalidArgumentException);