From e11befe95ef4b00d76b97d00ecfcb30976ca0863 Mon Sep 17 00:00:00 2001 From: Andrew McCallum Date: Mon, 30 Oct 1995 01:51:46 +0000 Subject: [PATCH] ([NSGSet -isEqual:]): Added method. ([NSGMutableSet -isEqual:]): Likewise. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@654 72102866-910b-0410-8b05-ffd578937521 --- Source/NSGSet.m | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/Source/NSGSet.m b/Source/NSGSet.m index c9bf67095..2107dbd52 100644 --- a/Source/NSGSet.m +++ b/Source/NSGSet.m @@ -71,9 +71,6 @@ { static int done = 0; - /* xxx This class not yet ready for action. */ - [self notImplemented:_cmd]; - if (!done) { done = 1; @@ -86,8 +83,11 @@ - initWithObjects: (id*)objects count: (unsigned)count { - return [self initWithType:@encode(id) - capacity:count]; + [self initWithType:@encode(id) + capacity:count]; + while (count--) + [self addObject:objects[count]]; + return self; } - member: anObject @@ -101,6 +101,11 @@ autorelease]; } +/* To deal with behavior over-enthusiasm. Will be fixed later. */ +- (BOOL) isEqual: other +{ + return [super isEqual:other]; +} @end @implementation NSGMutableSet @@ -109,9 +114,6 @@ { static int done = 0; - /* xxx This class not yet ready for action. */ - [self notImplemented:_cmd]; - if (!done) { done = 1; @@ -141,4 +143,10 @@ [self removeElement:anObject]; } +/* To deal with behavior over-enthusiasm. Will be fixed later. */ +- (BOOL) isEqual: other +{ + return [super isEqual:other]; +} + @end