formatting/coding style fixups

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35574 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2012-09-19 14:20:01 +00:00
parent b9b63476ef
commit 8ec0deff44
8 changed files with 871 additions and 771 deletions

View file

@ -34,10 +34,10 @@
#ifndef GS_DISABLE_SHELLSORT
void
_GSShellSort(id *objects,
NSRange sortRange,
id comparisonEntity,
GSComparisonType type,
void *context)
NSRange sortRange,
id comparisonEntity,
GSComparisonType type,
void *context)
{
/* Shell sort algorithm taken from SortingInAction - a NeXT example */
#define STRIDE_FACTOR 3 // good value for stride factor is not well-understood
@ -73,7 +73,9 @@ _GSShellSort(id *objects,
id a = objects[d + stride];
id b = objects[d];
NSComparisonResult r;
r = GSCompareUsingDescriptorOrComparator(a, b, comparisonEntity, context);
r = GSCompareUsingDescriptorOrComparator(a, b,
comparisonEntity, context);
if (r < 0)
{
#ifdef GSWARN
@ -82,7 +84,7 @@ _GSShellSort(id *objects,
badComparison = YES;
}
#endif
objects[d+stride] = b;
objects[d + stride] = b;
objects[d] = a;
if (stride > d)
{
@ -117,7 +119,7 @@ _GSShellSort(id *objects,
@end
@implementation GSShellSortPlaceHolder
+ (void)load
+ (void) load
{
_GSSortUnstable = _GSShellSort;
}