mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +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
30730bb37e
commit
0f42d88560
1 changed files with 16 additions and 18 deletions
|
@ -2159,6 +2159,9 @@ static Class doubleNumberClass;
|
||||||
|
|
||||||
- (NSComparisonResult) compare: (NSNumber*)other
|
- (NSComparisonResult) compare: (NSNumber*)other
|
||||||
{
|
{
|
||||||
|
double otherValue;
|
||||||
|
double myValue;
|
||||||
|
|
||||||
if (other == self)
|
if (other == self)
|
||||||
{
|
{
|
||||||
return NSOrderedSame;
|
return NSOrderedSame;
|
||||||
|
@ -2168,26 +2171,21 @@ static Class doubleNumberClass;
|
||||||
[NSException raise: NSInvalidArgumentException
|
[NSException raise: NSInvalidArgumentException
|
||||||
format: @"nil argument for compare:"];
|
format: @"nil argument for compare:"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
myValue = [self doubleValue];
|
||||||
|
otherValue = [other doubleValue];
|
||||||
|
|
||||||
|
if (myValue == otherValue)
|
||||||
|
{
|
||||||
|
return NSOrderedSame;
|
||||||
|
}
|
||||||
|
else if (myValue < otherValue)
|
||||||
|
{
|
||||||
|
return NSOrderedAscending;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
double otherValue;
|
return NSOrderedDescending;
|
||||||
double myValue;
|
|
||||||
|
|
||||||
myValue = [self doubleValue];
|
|
||||||
otherValue = [other doubleValue];
|
|
||||||
|
|
||||||
if (myValue == otherValue)
|
|
||||||
{
|
|
||||||
return NSOrderedSame;
|
|
||||||
}
|
|
||||||
else if (myValue < otherValue)
|
|
||||||
{
|
|
||||||
return NSOrderedAscending;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return NSOrderedDescending;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue