improve isEqual: for named colors

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28809 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2009-10-12 15:05:47 +00:00
parent f6296e504f
commit c8690dd5d7

View file

@ -1893,15 +1893,12 @@ static NSRecursiveLock *namedColorLock = nil;
- (BOOL) isEqual: (id)other
{
/* Instances of this class are uniqued, so a test for pointer equality
* is sufficient.
*/
if (other == self)
return YES;
if ([other isKindOfClass: [self class]] == NO
|| [[other catalogNameComponent] isEqualToString: _catalog_name] == NO
|| [[other colorNameComponent] isEqualToString: _color_name] == NO)
{
return NO;
}
return YES;
return NO;
}
- (NSColor*) colorUsingColorSpaceName: (NSString *)colorSpace