diff --git a/Source/GSArray.m b/Source/GSArray.m index 3d84d8c09..13e5239f8 100644 --- a/Source/GSArray.m +++ b/Source/GSArray.m @@ -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]) diff --git a/Source/GSCountedSet.m b/Source/GSCountedSet.m index cf3f3639e..2761ce82d 100644 --- a/Source/GSCountedSet.m +++ b/Source/GSCountedSet.m @@ -174,6 +174,11 @@ return map.nodeCount; } +- (id) init +{ + return [self initWithCapacity: 0]; +} + /* Designated initialiser */ - (id) initWithCapacity: (unsigned)cap { diff --git a/Source/GSDictionary.m b/Source/GSDictionary.m index ee802cee8..a1d18cae7 100644 --- a/Source/GSDictionary.m +++ b/Source/GSDictionary.m @@ -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 { diff --git a/Source/GSSet.m b/Source/GSSet.m index 588f816e3..4206f6325 100644 --- a/Source/GSSet.m +++ b/Source/GSSet.m @@ -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 {