mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Avoid compiler warning
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7191 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f048297123
commit
ee3d710d31
1 changed files with 16 additions and 18 deletions
|
@ -2159,6 +2159,9 @@ static Class doubleNumberClass;
|
|||
|
||||
- (NSComparisonResult) compare: (NSNumber*)other
|
||||
{
|
||||
double otherValue;
|
||||
double myValue;
|
||||
|
||||
if (other == self)
|
||||
{
|
||||
return NSOrderedSame;
|
||||
|
@ -2168,26 +2171,21 @@ static Class doubleNumberClass;
|
|||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"nil argument for compare:"];
|
||||
}
|
||||
|
||||
myValue = [self doubleValue];
|
||||
otherValue = [other doubleValue];
|
||||
|
||||
if (myValue == otherValue)
|
||||
{
|
||||
return NSOrderedSame;
|
||||
}
|
||||
else if (myValue < otherValue)
|
||||
{
|
||||
return NSOrderedAscending;
|
||||
}
|
||||
else
|
||||
{
|
||||
double otherValue;
|
||||
double myValue;
|
||||
|
||||
myValue = [self doubleValue];
|
||||
otherValue = [other doubleValue];
|
||||
|
||||
if (myValue == otherValue)
|
||||
{
|
||||
return NSOrderedSame;
|
||||
}
|
||||
else if (myValue < otherValue)
|
||||
{
|
||||
return NSOrderedAscending;
|
||||
}
|
||||
else
|
||||
{
|
||||
return NSOrderedDescending;
|
||||
}
|
||||
return NSOrderedDescending;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue