mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 17:51:01 +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
6ce668e937
commit
a2ffb6654e
1 changed files with 8 additions and 8 deletions
|
@ -66,15 +66,15 @@ static Class NSMutableSet_concrete_class;
|
||||||
|
|
||||||
+ set
|
+ set
|
||||||
{
|
{
|
||||||
return [[[[self _concreteClass] alloc] init]
|
return [[[self alloc] init]
|
||||||
autorelease];
|
autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ setWithObjects: (id*)objects
|
+ setWithObjects: (id*)objects
|
||||||
count: (unsigned)count
|
count: (unsigned)count
|
||||||
{
|
{
|
||||||
return [[[[self _concreteClass] alloc] initWithObjects:objects
|
return [[[self alloc] initWithObjects:objects
|
||||||
count:count]
|
count:count]
|
||||||
autorelease];
|
autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,14 +82,14 @@ static Class NSMutableSet_concrete_class;
|
||||||
{
|
{
|
||||||
/* xxx Only works because NSArray also responds to objectEnumerator
|
/* xxx Only works because NSArray also responds to objectEnumerator
|
||||||
and nextObject. */
|
and nextObject. */
|
||||||
return [[[[self _concreteClass] alloc] initWithSet:(NSSet*)objects]
|
return [[[self alloc] initWithSet:(NSSet*)objects]
|
||||||
autorelease];
|
autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ setWithObject: anObject
|
+ setWithObject: anObject
|
||||||
{
|
{
|
||||||
return [[[[self _concreteClass] alloc] initWithObjects:&anObject
|
return [[[self alloc] initWithObjects:&anObject
|
||||||
count:1]
|
count:1]
|
||||||
autorelease];
|
autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ static Class NSMutableSet_concrete_class;
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, firstObject);
|
va_start(ap, firstObject);
|
||||||
self = [[[self _concreteClass] alloc] initWithObjects:firstObject rest:ap];
|
self = [[self alloc] initWithObjects:firstObject rest:ap];
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
return [self autorelease];
|
return [self autorelease];
|
||||||
}
|
}
|
||||||
|
@ -319,7 +319,7 @@ static Class NSMutableSet_concrete_class;
|
||||||
|
|
||||||
+ setWithCapacity: (unsigned)numItems
|
+ setWithCapacity: (unsigned)numItems
|
||||||
{
|
{
|
||||||
return [[[[self _mutableConcreteClass] alloc] initWithCapacity:numItems]
|
return [[[self alloc] initWithCapacity:numItems]
|
||||||
autorelease];
|
autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue