Remove commented out code.

This commit is contained in:
fredkiefer 2019-06-27 14:29:01 +02:00
parent e67971346a
commit cbe54c4073

View file

@ -108,23 +108,6 @@ static SEL rlSel;
// NSCoding // NSCoding
- (instancetype) initWithCoder: (NSCoder *)coder - (instancetype) initWithCoder: (NSCoder *)coder
{ {
/*
Class c;
c = object_getClass(self);
if (c == NSOrderedSet_abstract_class)
{
DESTROY(self);
self = [NSOrderedSet_concrete_class allocWithZone: NSDefaultMallocZone()];
return [self initWithCoder: coder];
}
else if (c == NSMutableOrderedSet_abstract_class)
{
DESTROY(self);
self = [NSMutableOrderedSet_concrete_class allocWithZone: NSDefaultMallocZone()];
return [self initWithCoder: coder];
}
*/
if ([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
id array; id array;
@ -265,16 +248,7 @@ static SEL rlSel;
*/ */
if (count > 0) if (count > 0)
{ {
// IMP imp = [self methodForSelector: @selector(objectAtIndex:)];
// int i;
// int p = state->state;
[self getObjects: stackbuf range: NSMakeRange(state->state, count)]; [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; state->state += count;
} }
else else
@ -1446,7 +1420,6 @@ static SEL rlSel;
i = [self count]; i = [self count];
if (i > 0) if (i > 0)
{ {
IMP rem = 0;
IMP get = [self methodForSelector: oaiSel]; IMP get = [self methodForSelector: oaiSel];
BOOL (*eq)(id, SEL, id) BOOL (*eq)(id, SEL, id)
= (BOOL (*)(id, SEL, id))[anObject methodForSelector: eqSel]; = (BOOL (*)(id, SEL, id))[anObject methodForSelector: eqSel];
@ -1457,24 +1430,10 @@ static SEL rlSel;
if (o == anObject || (*eq)(anObject, eqSel, o) == YES) if (o == anObject || (*eq)(anObject, eqSel, o) == YES)
{ {
if (rem == 0) [self removeObjectAtIndex: i];
{
rem = [self methodForSelector: remSel];
/*
* We need to retain the object so that when we remove the
* first equal object we don't get left with a bad object
* pointer for later comparisons.
*/
// RETAIN(anObject);
}
(*rem)(self, remSel, i);
break; // since this is a set we should only have one copy... break; // since this is a set we should only have one copy...
} }
} }
//if (rem != 0)
// {
// RELEASE(anObject);
// }
} }
} }
@ -1804,7 +1763,7 @@ static SEL rlSel;
[self removeAllObjects]; [self removeAllObjects];
[self addObjectsFromArray: res]; [self addObjectsFromArray: res];
// RELEASE(res); RELEASE(res);
GS_ENDIDBUF(); GS_ENDIDBUF();
} }
} }
@ -1813,11 +1772,12 @@ static SEL rlSel;
options: (NSSortOptions)options options: (NSSortOptions)options
usingComparator: (NSComparator)comparator usingComparator: (NSComparator)comparator
{ {
// FIXME: Implementation missing
} }
- (void) intersectOrderedSet: (NSOrderedSet *)other - (void) intersectOrderedSet: (NSOrderedSet *)other
{ {
if (other != self) if (other != self)
{ {
id keys = [self objectEnumerator]; id keys = [self objectEnumerator];
id key; id key;