mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 09:41:15 +00:00
([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
This commit is contained in:
parent
e2953be450
commit
1a66a3676d
1 changed files with 8 additions and 8 deletions
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue