mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +00:00
Clean compilation
This commit is contained in:
parent
9a516999c8
commit
d4428e8d6c
3 changed files with 75 additions and 66 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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,20 +744,13 @@ static Class mutableSetClass;
|
|||
|
||||
- (void) minusSet: (NSSet*) other
|
||||
{
|
||||
if (other == self)
|
||||
NSEnumerator *e = [other objectEnumerator];
|
||||
id anObject;
|
||||
|
||||
while ((anObject = [e nextObject]) != nil)
|
||||
{
|
||||
GSIMapCleanMap(&map);
|
||||
}
|
||||
else
|
||||
{
|
||||
NSEnumerator *e = [other objectEnumerator];
|
||||
id anObject;
|
||||
|
||||
while ((anObject = [e nextObject]) != nil)
|
||||
{
|
||||
GSIMapRemoveKey(&map, (GSIMapKey)anObject);
|
||||
_version++;
|
||||
}
|
||||
GSIMapRemoveKey(&map, (GSIMapKey)anObject);
|
||||
_version++;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -779,26 +772,23 @@ static Class mutableSetClass;
|
|||
|
||||
- (void) unionSet: (NSSet*) other
|
||||
{
|
||||
if (other != self)
|
||||
NSEnumerator *e = [other objectEnumerator];
|
||||
|
||||
if (e != nil)
|
||||
{
|
||||
NSEnumerator *e = [other objectEnumerator];
|
||||
|
||||
if (e != nil)
|
||||
id anObject;
|
||||
SEL sel = @selector(nextObject);
|
||||
IMP imp = [e methodForSelector: sel];
|
||||
|
||||
while ((anObject = (*imp)(e, sel)) != nil)
|
||||
{
|
||||
id anObject;
|
||||
SEL sel = @selector(nextObject);
|
||||
IMP imp = [e methodForSelector: sel];
|
||||
|
||||
while ((anObject = (*imp)(e, sel)) != nil)
|
||||
GSIMapNode node;
|
||||
|
||||
node = GSIMapNodeForKey(&map, (GSIMapKey)anObject);
|
||||
if (node == 0)
|
||||
{
|
||||
GSIMapNode node;
|
||||
|
||||
node = GSIMapNodeForKey(&map, (GSIMapKey)anObject);
|
||||
if (node == 0)
|
||||
{
|
||||
GSIMapAddKey(&map, (GSIMapKey)anObject);
|
||||
_version++;
|
||||
}
|
||||
GSIMapAddKey(&map, (GSIMapKey)anObject);
|
||||
_version++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
GS_USEIDLIST(firstObject,
|
||||
set = [[self allocWithZone: NSDefaultMallocZone()]
|
||||
initWithObjects: __objects count: __count]);
|
||||
return AUTORELEASE(set);
|
||||
}
|
||||
|
||||
+ (instancetype) orderedSetWithObjects:(const GS_GENERIC_TYPE(ElementT)[])objects
|
||||
+ (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
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -578,8 +596,9 @@ 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue