Clean compilation

This commit is contained in:
Gregory John Casamento 2019-05-20 04:01:20 -04:00
parent 9a516999c8
commit d4428e8d6c
3 changed files with 75 additions and 66 deletions

View file

@ -66,8 +66,8 @@ extern "C" {
+ (instancetype) orderedSetWithObjects:(GS_GENERIC_TYPE(ElementT))firstObject, ...;
+ (instancetype) orderedSetWithObjects:(const GS_GENERIC_TYPE(ElementT)[])objects
count:(NSUInteger) count;
+ (instancetype) orderedSetWithOrderedSet:(GS_GENERIC_CLASS(NSSet, ElementT)*)aSet;
+ (instancetype) orderedSetWithOrderedSet:(GS_GENERIC_CLASS(NSSet, ElementT)*)aSet
+ (instancetype) orderedSetWithOrderedSet:(GS_GENERIC_CLASS(NSOrderedSet, ElementT)*)aSet;
+ (instancetype) orderedSetWithOrderedSet:(GS_GENERIC_CLASS(NSOrderedSet, ElementT)*)aSet
count:(NSUInteger) count;
+ (instancetype) orderedSetWithSet:(GS_GENERIC_CLASS(NSSet, ElementT)*)aSet;
+ (instancetype) orderedSetWithSet:(GS_GENERIC_CLASS(NSSet, ElementT)*)aSet
@ -83,10 +83,10 @@ extern "C" {
- (instancetype) initWithObjects:(GS_GENERIC_TYPE(ElementT))firstObject, ...;
- (instancetype) initWithObjects:(const GS_GENERIC_TYPE(ElementT)[])objects
count:(NSUInteger)count;
- (instancetype) initWithOrderedSet:(GS_GENERIC_CLASS(NSSet, ElementT)*)aSet;
- (instancetype) initWithOrderedSet:(GS_GENERIC_CLASS(NSArray, ElementT)*)objects
- (instancetype) initWithOrderedSet:(GS_GENERIC_CLASS(NSOrderedSet, ElementT)*)aSet;
- (instancetype) initWithOrderedSet:(GS_GENERIC_CLASS(NSOrderedSet, ElementT)*)aSet
copyItems:(BOOL)flag;
- (instancetype) initWithOrderedSet:(GS_GENERIC_CLASS(NSArray, ElementT)*)objects
- (instancetype) initWithOrderedSet:(GS_GENERIC_CLASS(NSOrderedSet, ElementT)*)aSet
range: (NSRange)range
copyItems:(BOOL)flag;
- (instancetype) initWithSet:(GS_GENERIC_CLASS(NSSet, ElementT)*)aSet;
@ -164,7 +164,7 @@ extern "C" {
// Describing a set
- (NSString *) description;
- (NSString *) descriptionWithLocale: (NSLocale *)locale;
- (NSString *) descriptionWithLocale: (id)locale indent: (BOOL)flag;
- (NSString *) descriptionWithLocale: (NSLocale *)locale indent: (BOOL)flag;
@end
// Mutable Ordered Set
@ -204,11 +204,11 @@ extern "C" {
options:(NSSortOptions)options
usingComparator: (NSComparator)comparator;
- (void) intersectOrderedSet:(GS_GENERIC_CLASS(NSOrderedSet, ElementT)*)aSet;
- (void) intersectSet:(GS_GENERIC_CLASS(NSOrderedSet, ElementT)*)aSet;
- (void) intersectSet:(GS_GENERIC_CLASS(NSSet, ElementT)*)aSet;
- (void) minusOrderedSet:(GS_GENERIC_CLASS(NSOrderedSet, ElementT)*)aSet;
- (void) minusSet:(GS_GENERIC_CLASS(NSOrderedSet, ElementT)*)aSet;
- (void) minusSet:(GS_GENERIC_CLASS(NSSet, ElementT)*)aSet;
- (void) unionOrderedSet:(GS_GENERIC_CLASS(NSOrderedSet, ElementT)*)aSet;
- (void) unionSet:(GS_GENERIC_CLASS(NSOrderedSet, ElementT)*)aSet;
- (void) unionSet:(GS_GENERIC_CLASS(NSSet, ElementT)*)aSet;
- (instancetype) initWithCoder: (NSCoder *)coder;
@end

View file

@ -521,7 +521,7 @@ static Class mutableSetClass;
- (NSEnumerator*) objectEnumerator
{
return AUTORELEASE([[GSOrderedSetEnumerator alloc] initWithSet: self]);
return AUTORELEASE([[GSOrderedSetEnumerator alloc] initWithOrderedSet: self]);
}
- (NSUInteger) countByEnumeratingWithState: (NSFastEnumerationState*)state
@ -614,7 +614,7 @@ static Class mutableSetClass;
{
NSOrderedSet *copy = [setClass allocWithZone: z];
return [copy initWithSet: self copyItems: NO];
return [copy initWithOrderedSet: self copyItems: NO];
}
- (id) init
@ -744,12 +744,6 @@ static Class mutableSetClass;
- (void) minusSet: (NSSet*) other
{
if (other == self)
{
GSIMapCleanMap(&map);
}
else
{
NSEnumerator *e = [other objectEnumerator];
id anObject;
@ -758,7 +752,6 @@ static Class mutableSetClass;
GSIMapRemoveKey(&map, (GSIMapKey)anObject);
_version++;
}
}
}
- (void) removeAllObjects
@ -779,8 +772,6 @@ static Class mutableSetClass;
- (void) unionSet: (NSSet*) other
{
if (other != self)
{
NSEnumerator *e = [other objectEnumerator];
if (e != nil)
@ -801,7 +792,6 @@ static Class mutableSetClass;
}
}
}
}
}
- (NSUInteger) countByEnumeratingWithState: (NSFastEnumerationState*)state

View file

@ -33,7 +33,10 @@
#import "Foundation/NSKeyValueCoding.h"
#import "Foundation/NSValue.h"
#import "Foundation/NSException.h"
// #import "GNUstepBase/GNUstep.h"
// For private method _decodeArrayOfObjectsForKey:
#import "Foundation/NSKeyedArchiver.h"
#import "GSPrivate.h"
#import "GSFastEnumeration.h"
@ -75,6 +78,11 @@ static Class NSMutableOrderedSet_concrete_class;
}
}
- (Class) classForCoder
{
return NSOrderedSet_abstract_class;
}
// NSCoding
- (instancetype) initWithCoder: (NSCoder *)coder
{
@ -223,49 +231,59 @@ static Class NSMutableOrderedSet_concrete_class;
+ (instancetype) orderedSetWithArray:(NSArray *)objects
{
return nil;
return AUTORELEASE([[self allocWithZone: NSDefaultMallocZone()]
initWithArray: objects]);
}
+ (instancetype) orderedSetWithArray:(NSArray *)objects
range: (NSRange)range
range:(NSRange)range
copyItems:(BOOL)flag
{
return nil;
return AUTORELEASE([[self allocWithZone: NSDefaultMallocZone()]
initWithArray: objects
range: range
copyItems: flag]);
}
+ (instancetype) orderedSetWithObject:(GS_GENERIC_TYPE(ElementT))anObject
+ (instancetype) orderedSetWithObject:(id)anObject
{
return nil;
return AUTORELEASE([[self allocWithZone: NSDefaultMallocZone()]
initWithObject: anObject]);
}
+ (instancetype) orderedSetWithObjects:(GS_GENERIC_TYPE(ElementT))firstObject, ...
+ (instancetype) orderedSetWithObjects:(id)firstObject, ...
{
return nil;
}
id set;
+ (instancetype) orderedSetWithObjects:(const GS_GENERIC_TYPE(ElementT)[])objects
GS_USEIDLIST(firstObject,
set = [[self allocWithZone: NSDefaultMallocZone()]
initWithObjects: __objects count: __count]);
return AUTORELEASE(set);
}
+ (instancetype) orderedSetWithObjects:(const id [])objects
count:(NSUInteger) count
{
return nil;
}
+ (instancetype) orderedSetWithOrderedSet:(GS_GENERIC_CLASS(NSSet, ElementT)*)aSet
+ (instancetype) orderedSetWithOrderedSet:(NSOrderedSet *)aSet
{
return nil;
}
+ (instancetype) orderedSetWithOrderedSet:(GS_GENERIC_CLASS(NSSet, ElementT)*)aSet
+ (instancetype) orderedSetWithOrderedSet:(NSOrderedSet *)aSet
count:(NSUInteger) count
{
return nil;
}
+ (instancetype) orderedSetWithSet:(GS_GENERIC_CLASS(NSSet, ElementT)*)aSet
+ (instancetype) orderedSetWithSet:(NSSet *)aSet
{
return nil;
}
+ (instancetype) orderedSetWithSet:(GS_GENERIC_CLASS(NSSet, ElementT)*)aSet
+ (instancetype) orderedSetWithSet:(NSSet *)aSet
copyItems:(BOOL)flag
{
return nil;
@ -294,41 +312,41 @@ static Class NSMutableOrderedSet_concrete_class;
return nil;
}
- (instancetype) initWithObjects:(GS_GENERIC_TYPE(ElementT))firstObject, ...
- (instancetype) initWithObjects:(id)firstObject, ...
{
return nil;
}
- (instancetype) initWithObjects:(const GS_GENERIC_TYPE(ElementT)[])objects
- (instancetype) initWithObjects:(const id [])objects
count:(NSUInteger)count
{
return nil;
}
- (instancetype) initWithOrderedSet:(GS_GENERIC_CLASS(NSSet, ElementT)*)aSet
- (instancetype) initWithOrderedSet:(NSOrderedSet *)aSet
{
return nil;
}
- (instancetype) initWithOrderedSet:(NSArray *)objects
- (instancetype) initWithOrderedSet:(NSOrderedSet *)objects
copyItems:(BOOL)flag
{
return nil;
}
- (instancetype) initWithOrderedSet:(NSArray *)objects
range: (NSRange)range
- (instancetype) initWithOrderedSet:(NSOrderedSet *)objects
range:(NSRange)range
copyItems:(BOOL)flag
{
return nil;
}
- (instancetype) initWithSet:(GS_GENERIC_CLASS(NSSet, ElementT)*)aSet
- (instancetype) initWithSet:(NSSet *)aSet
{
return nil;
}
- (instancetype) initWithSet:(GS_GENERIC_CLASS(NSSet, ElementT)*)aSet copyItems:(BOOL)flag
- (instancetype) initWithSet:(NSSet *)aSet copyItems:(BOOL)flag
{
return nil;
}
@ -343,7 +361,7 @@ static Class NSMutableOrderedSet_concrete_class;
return 0;
}
- (BOOL)containsObject:(GS_GENERIC_TYPE(ElementT))anObject
- (BOOL)containsObject:(id)anObject
{
return NO;
}
@ -354,7 +372,7 @@ static Class NSMutableOrderedSet_concrete_class;
{
}
- (void) enumerateObjectsUsingBlock: (GSEnumeratorBlock)aBlock
- (void) enumerateObjectsUsingBlock:(GSEnumeratorBlock)aBlock
{
}
@ -579,7 +597,8 @@ static Class NSMutableOrderedSet_concrete_class;
- (NSString *) descriptionWithLocale: (NSLocale *)locale
{
return [[self allObjects] descriptionWithLocale: locale];
NSArray *allObjects = [self sortedArrayUsingDescriptors: nil];
return [allObjects descriptionWithLocale: locale];
}
- (NSString*) descriptionWithLocale: (NSLocale *)locale indent: (BOOL)flag