aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/MCPKit/MCPFoundationKit/MCPNumber.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2009-08-26 21:18:28 +0000
committerstuconnolly <stuart02@gmail.com>2009-08-26 21:18:28 +0000
commit63c47d26eeed7e2602e0925cae8e7386963ce695 (patch)
tree99529d48c972af8348f5478930a4116e0cc608b0 /Frameworks/MCPKit/MCPFoundationKit/MCPNumber.m
parent082332ed69b7cfb2d11d1d45b848cb1fc393b3ca (diff)
downloadsequelpro-63c47d26eeed7e2602e0925cae8e7386963ce695.tar.gz
sequelpro-63c47d26eeed7e2602e0925cae8e7386963ce695.tar.bz2
sequelpro-63c47d26eeed7e2602e0925cae8e7386963ce695.zip
Make the MCPkit framework truly 64 bit compatible by using the appropriate data types.
Diffstat (limited to 'Frameworks/MCPKit/MCPFoundationKit/MCPNumber.m')
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPNumber.m24
1 files changed, 12 insertions, 12 deletions
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPNumber.m b/Frameworks/MCPKit/MCPFoundationKit/MCPNumber.m
index bab493c3..3dab0e07 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPNumber.m
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPNumber.m
@@ -55,12 +55,12 @@
+ (MCPNumber *)numberWithInt:(int)value
{
- return [[[MCPNumber alloc] initWithInt:value] autorelease];
+ return [[[MCPNumber alloc] initWithInteger:value] autorelease];
}
+ (MCPNumber *)numberWithUnsignedInt:(unsigned int)value
{
- return [[[MCPNumber alloc] initWithUnsignedInt:value] autorelease];
+ return [[[MCPNumber alloc] initWithUnsignedInteger:value] autorelease];
}
+ (MCPNumber *)numberWithLong:(long)value
@@ -85,7 +85,7 @@
+ (MCPNumber *)numberWithFloat:(float)value
{
- return [[[MCPNumber alloc] initWithFloat:value] autorelease];
+ return [[[MCPNumber alloc] initWithDouble:value] autorelease];
}
+ (MCPNumber *)numberWithDouble:(double)value
@@ -135,16 +135,16 @@
- (id)initWithInt:(int)value
{
- typeCode = @encode(int);
- number = [[NSNumber alloc] initWithInt:value];
+ typeCode = @encode(NSInteger);
+ number = [[NSNumber alloc] initWithInteger:value];
return self;
}
- (id)initWithUnsignedInt:(unsigned int)value
{
- typeCode = @encode(unsigned int);
- number = [[NSNumber alloc] initWithUnsignedInt:value];
+ typeCode = @encode(NSUInteger);
+ number = [[NSNumber alloc] initWithUnsignedInteger:value];
return self;
}
@@ -183,8 +183,8 @@
- (id)initWithFloat:(float)value
{
- typeCode = @encode(float);
- number = [[NSNumber alloc] initWithFloat:value];
+ typeCode = @encode(CGFloat);
+ number = [[NSNumber alloc] initWithDouble:value];
return self;
}
@@ -246,12 +246,12 @@
- (int)intValue
{
- return [number intValue];
+ return [number integerValue];
}
- (unsigned int)unsignedIntValue
{
- return [number unsignedIntValue];
+ return [number unsignedIntegerValue];
}
- (long)longValue
@@ -276,7 +276,7 @@
- (float)floatValue
{
- return [number floatValue];
+ return [number doubleValue];
}
- (double)doubleValue