mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 09:41:15 +00:00
Added methods
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6320 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5b5de09bfb
commit
009d8dacbb
2 changed files with 31 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2000-03-18 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSNumber.m: Added private methods from concrete class.
|
||||||
|
|
||||||
2000-03-17 Adam Fedor <fedor@gnu.org>
|
2000-03-17 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
* Documentation/coding-standards.tmpl.texi: Update
|
* Documentation/coding-standards.tmpl.texi: Update
|
||||||
|
|
|
@ -31,6 +31,12 @@
|
||||||
#include <Foundation/NSConcreteNumber.h>
|
#include <Foundation/NSConcreteNumber.h>
|
||||||
#include <Foundation/NSCoder.h>
|
#include <Foundation/NSCoder.h>
|
||||||
|
|
||||||
|
@interface NSNumber (Private)
|
||||||
|
- (int)_nextOrder;
|
||||||
|
- (NSComparisonResult) _promotedCompare: (NSNumber*)other;
|
||||||
|
- (int)_typeOrder;
|
||||||
|
@end
|
||||||
|
|
||||||
@implementation NSNumber
|
@implementation NSNumber
|
||||||
|
|
||||||
static Class abstractClass;
|
static Class abstractClass;
|
||||||
|
@ -524,4 +530,25 @@ static Class doubleNumberClass;
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (int)_nextOrder
|
||||||
|
{
|
||||||
|
return 12;
|
||||||
|
}
|
||||||
|
- (NSComparisonResult) _promotedCompare: (NSNumber*)other
|
||||||
|
{
|
||||||
|
double v0, v1;
|
||||||
|
|
||||||
|
v0 = [self doubleValue];
|
||||||
|
v1 = [other doubleValue];
|
||||||
|
|
||||||
|
if (v0 == v1)
|
||||||
|
return NSOrderedSame;
|
||||||
|
else
|
||||||
|
return (v0 < v1) ? NSOrderedAscending : NSOrderedDescending;
|
||||||
|
}
|
||||||
|
- (int)_typeOrder
|
||||||
|
{
|
||||||
|
return 12;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in a new issue