Tiny performance improvements when testing for equality

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6336 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2000-03-19 21:04:02 +00:00
parent 16ea7d5057
commit 77e32f2c78
2 changed files with 9 additions and 1 deletions

View file

@ -273,7 +273,7 @@
format: @"Cannot copy value into NULL pointer"];
/* NOT REACHED */
}
memcpy( value, &data, objc_sizeof_type([self objCType]) );
memcpy(value, &data, objc_sizeof_type([self objCType]));
}
- (const char*) objCType

View file

@ -777,6 +777,10 @@ static Class doubleNumberClass;
- (BOOL) isEqual: o
{
if (o == self)
{
return YES;
}
if (o != nil && fastIsInstance(o)
&& fastInstanceIsKindOfClass(o, abstractClass))
{
@ -787,6 +791,10 @@ static Class doubleNumberClass;
- (BOOL) isEqualToNumber: (NSNumber*)o
{
if (o == self)
{
return YES;
}
if ([self compare: o] == NSOrderedSame)
{
return YES;