16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#include "config.h"
#include <math.h>
#import "OFNumber.h"
#import "OFString.h"
#import "OFExceptions.h"
#import "macros.h"
#define RETURN_AS(t) \
switch (type) { \
case OF_NUMBER_BOOL: \
return (t)value.bool_; \
case OF_NUMBER_CHAR: \
|
>
|
>
>
|
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#include "config.h"
#include <math.h>
#import "OFNumber.h"
#import "OFString.h"
#import "OFInvalidFormatException.h"
#import "OFNotImplementedException.h"
#import "macros.h"
#define RETURN_AS(t) \
switch (type) { \
case OF_NUMBER_BOOL: \
return (t)value.bool_; \
case OF_NUMBER_CHAR: \
|
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
|
return ([(OFNumber*)obj uIntMaxValue] == [self uIntMaxValue]
? YES : NO);
case OF_NUMBER_FLOAT:
case OF_NUMBER_DOUBLE:
return ([(OFNumber*)obj doubleValue] == [self doubleValue]
? YES : NO);
default:
@throw [OFInvalidArgumentException newWithClass: isa
selector: _cmd];
}
}
- (uint32_t)hash
{
uint32_t hash;
size_t i;
|
|
<
|
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
|
return ([(OFNumber*)obj uIntMaxValue] == [self uIntMaxValue]
? YES : NO);
case OF_NUMBER_FLOAT:
case OF_NUMBER_DOUBLE:
return ([(OFNumber*)obj doubleValue] == [self doubleValue]
? YES : NO);
default:
return NO;
}
}
- (uint32_t)hash
{
uint32_t hash;
size_t i;
|