From 1a66a3676d47e7f3e48e406c02ce011d3e4a476d Mon Sep 17 00:00:00 2001 From: mccallum Date: Fri, 3 Nov 1995 22:24:14 +0000 Subject: [PATCH] ([NSSet +set]): Use +alloc, not _concreteClass. This makes [NSMutableSet +set] and friends do the right thing. ([NSSet +setWithObjects:count:]): Likewise. ([NSSet +setWithArray:]): Likewise. ([NSSet +setWithObject:]): Likewise. ([NSSet +setWithObjects:]): Likewise. ([NSMutableSet +setWithCapacity:]): Likewise. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@660 72102866-910b-0410-8b05-ffd578937521 --- Source/NSSet.m | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/NSSet.m b/Source/NSSet.m index 3a4cae0f3..2555c668c 100644 --- a/Source/NSSet.m +++ b/Source/NSSet.m @@ -66,15 +66,15 @@ static Class NSMutableSet_concrete_class; + set { - return [[[[self _concreteClass] alloc] init] + return [[[self alloc] init] autorelease]; } + setWithObjects: (id*)objects count: (unsigned)count { - return [[[[self _concreteClass] alloc] initWithObjects:objects - count:count] + return [[[self alloc] initWithObjects:objects + count:count] autorelease]; } @@ -82,14 +82,14 @@ static Class NSMutableSet_concrete_class; { /* xxx Only works because NSArray also responds to objectEnumerator and nextObject. */ - return [[[[self _concreteClass] alloc] initWithSet:(NSSet*)objects] + return [[[self alloc] initWithSet:(NSSet*)objects] autorelease]; } + setWithObject: anObject { - return [[[[self _concreteClass] alloc] initWithObjects:&anObject - count:1] + return [[[self alloc] initWithObjects:&anObject + count:1] autorelease]; } @@ -125,7 +125,7 @@ static Class NSMutableSet_concrete_class; { va_list ap; va_start(ap, firstObject); - self = [[[self _concreteClass] alloc] initWithObjects:firstObject rest:ap]; + self = [[self alloc] initWithObjects:firstObject rest:ap]; va_end(ap); return [self autorelease]; } @@ -319,7 +319,7 @@ static Class NSMutableSet_concrete_class; + setWithCapacity: (unsigned)numItems { - return [[[[self _mutableConcreteClass] alloc] initWithCapacity:numItems] + return [[[self alloc] initWithCapacity:numItems] autorelease]; }