mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 01:31:08 +00:00
Override -init to use our own initialiser
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20013 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e398188c18
commit
420c49dd17
4 changed files with 44 additions and 5 deletions
|
@ -137,6 +137,11 @@ static Class GSInlineArrayClass;
|
|||
NSDeallocateObject(self);
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
return [self initWithObjects: 0 count: 0];
|
||||
}
|
||||
|
||||
/* This is the designated initializer for NSArray. */
|
||||
- (id) initWithObjects: (id*)objects count: (unsigned)count
|
||||
{
|
||||
|
@ -215,11 +220,6 @@ static Class GSInlineArrayClass;
|
|||
return self;
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
return [self initWithObjects: 0 count: 0];
|
||||
}
|
||||
|
||||
- (unsigned) count
|
||||
{
|
||||
return _count;
|
||||
|
@ -377,6 +377,10 @@ static Class GSInlineArrayClass;
|
|||
}
|
||||
NSDeallocateObject(self);
|
||||
}
|
||||
- (id) init
|
||||
{
|
||||
return [self initWithObjects: 0 count: 0];
|
||||
}
|
||||
- (id) initWithObjects: (id*)objects count: (unsigned)count
|
||||
{
|
||||
_contents_array = (id*)&self[1];
|
||||
|
@ -468,6 +472,11 @@ static Class GSInlineArrayClass;
|
|||
}
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
return [self initWithCapacity: 0];
|
||||
}
|
||||
|
||||
- (id) initWithCapacity: (unsigned)cap
|
||||
{
|
||||
if (cap == 0)
|
||||
|
@ -1016,6 +1025,11 @@ static Class GSInlineArrayClass;
|
|||
return; // placeholders never get deallocated.
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
return [self initWithObjects: 0 count: 0];
|
||||
}
|
||||
|
||||
- (id) initWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
|
|
|
@ -174,6 +174,11 @@
|
|||
return map.nodeCount;
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
return [self initWithCapacity: 0];
|
||||
}
|
||||
|
||||
/* Designated initialiser */
|
||||
- (id) initWithCapacity: (unsigned)cap
|
||||
{
|
||||
|
|
|
@ -132,6 +132,11 @@ static SEL objSel;
|
|||
return map.nodeCount;
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
return [self initWithObjects: 0 forKeys: 0 count: 0];
|
||||
}
|
||||
|
||||
- (id) initWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
|
@ -352,6 +357,11 @@ static SEL objSel;
|
|||
return [copy initWithDictionary: self copyItems: NO];
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
return [self initWithCapacity: 0];
|
||||
}
|
||||
|
||||
/* Designated initialiser */
|
||||
- (id) initWithCapacity: (unsigned)cap
|
||||
{
|
||||
|
|
|
@ -194,6 +194,11 @@ static Class mutableSetClass;
|
|||
return map.nodeCount;
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
return [self initWithObjects: 0 count: 0];
|
||||
}
|
||||
|
||||
- (id) initWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
|
@ -551,6 +556,11 @@ static Class mutableSetClass;
|
|||
return [copy initWithSet: self copyItems: NO];
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
return [self initWithCapacity: 0];
|
||||
}
|
||||
|
||||
/* Designated initialiser */
|
||||
- (id) initWithCapacity: (unsigned)cap
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue