mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Fix issues suggested by fred
This commit is contained in:
parent
9f4a5c80ed
commit
7799824de6
2 changed files with 9 additions and 41 deletions
|
@ -49,8 +49,6 @@
|
|||
|
||||
#import "GNUstepBase/GSIArray.h"
|
||||
|
||||
// static SEL memberSel;
|
||||
static SEL privateCountOfSel;
|
||||
@interface GSOrderedSet : NSOrderedSet
|
||||
{
|
||||
@public
|
||||
|
@ -144,7 +142,6 @@ static Class mutableSetClass;
|
|||
{
|
||||
setClass = [GSOrderedSet class];
|
||||
mutableSetClass = [GSMutableOrderedSet class];
|
||||
privateCountOfSel = @selector(_countForObject:);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -382,30 +379,3 @@ static Class mutableSetClass;
|
|||
}
|
||||
@end
|
||||
|
||||
@interface NSGOrderedSet : NSOrderedSet
|
||||
@end
|
||||
|
||||
@implementation NSGOrderedSet
|
||||
- (id) initWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
NSLog(@"Warning - decoding archive containing obsolete %@ object - please delete/replace this archive", NSStringFromClass([self class]));
|
||||
DESTROY(self);
|
||||
self = (id)NSAllocateObject([GSOrderedSet class], 0, NSDefaultMallocZone());
|
||||
self = [self initWithCoder: aCoder];
|
||||
return self;
|
||||
}
|
||||
@end
|
||||
|
||||
@interface NSGMutableOrderedSet : NSMutableOrderedSet
|
||||
@end
|
||||
@implementation NSGMutableOrderedSet
|
||||
- (id) initWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
NSLog(@"Warning - decoding archive containing obsolete %@ object - please delete/replace this archive", NSStringFromClass([self class]));
|
||||
DESTROY(self);
|
||||
self = (id)NSAllocateObject([GSMutableOrderedSet class], 0, NSDefaultMallocZone());
|
||||
self = [self initWithCoder: aCoder];
|
||||
return self;
|
||||
}
|
||||
@end
|
||||
|
||||
|
|
|
@ -267,14 +267,16 @@ static SEL rlSel;
|
|||
*/
|
||||
if (count > 0)
|
||||
{
|
||||
IMP imp = [self methodForSelector: @selector(objectAtIndex:)];
|
||||
int p = state->state;
|
||||
int i;
|
||||
// IMP imp = [self methodForSelector: @selector(objectAtIndex:)];
|
||||
// int i;
|
||||
// int p = state->state;
|
||||
|
||||
|
||||
for (i = 0; i < count; i++, p++)
|
||||
[self getObjects: stackbuf range: NSMakeRange(state->state, count)];
|
||||
/*for (i = 0; i < count; i++, p++)
|
||||
{
|
||||
stackbuf[i] = (*imp)(self, @selector(objectAtIndex:), p);
|
||||
}
|
||||
}*/
|
||||
state->state += count;
|
||||
}
|
||||
else
|
||||
|
@ -1096,11 +1098,6 @@ static SEL rlSel;
|
|||
return results;
|
||||
}
|
||||
|
||||
- (NSUInteger)_countForObject: (id)object // required override...
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Comparing Sets
|
||||
- (BOOL) isEqualToOrderedSet: (NSOrderedSet *)aSet
|
||||
{
|
||||
|
@ -1128,7 +1125,8 @@ static SEL rlSel;
|
|||
// Set operations
|
||||
- (BOOL) intersectsOrderedSet: (NSOrderedSet *)otherSet
|
||||
{
|
||||
id o = nil, e = nil;
|
||||
id o = nil;
|
||||
NSEnumerator *e = nil;
|
||||
|
||||
// -1. If this set is empty, this method should return NO.
|
||||
if ([self count] == 0)
|
||||
|
|
Loading…
Reference in a new issue