mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
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:
parent
2e8a34c705
commit
b45195874d
1 changed files with 7 additions and 7 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue