aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPColorAdditions.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2011-03-19 15:05:23 +0000
committerstuconnolly <stuart02@gmail.com>2011-03-19 15:05:23 +0000
commit6d3f21336846d7745e795202c99390832c4220c8 (patch)
tree6195dafeeb1871afc5e41f6f17a917dc8047d44a /Source/SPColorAdditions.m
parentb2a0af91eae18b6490ddeafd2708d256b0d53cb3 (diff)
downloadsequelpro-6d3f21336846d7745e795202c99390832c4220c8.tar.gz
sequelpro-6d3f21336846d7745e795202c99390832c4220c8.tar.bz2
sequelpro-6d3f21336846d7745e795202c99390832c4220c8.zip
Bring outline view branch up to date with trunk (r3235:r3245), which should resolve all warnings.
Diffstat (limited to 'Source/SPColorAdditions.m')
-rw-r--r--Source/SPColorAdditions.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/SPColorAdditions.m b/Source/SPColorAdditions.m
index d6dc8056..b9353921 100644
--- a/Source/SPColorAdditions.m
+++ b/Source/SPColorAdditions.m
@@ -68,19 +68,19 @@
[scanner scanCharactersFromSet:hexCharSet intoString:&code];
if( [code length] == 8 ) { // decode colors like #ffee33aa
- NSUInteger color = 0;
+ unsigned int color = 0;
scanner = [NSScanner scannerWithString:code];
if( ! [scanner scanHexInt:&color] ) return nil;
return [self colorWithCalibratedRed:( ( ( color >> 24 ) & 0xff ) / 255. ) green:( ( ( color >> 16 ) & 0xff ) / 255. ) blue:( ( ( color >> 8) & 0xff ) / 255. ) alpha:( ( color & 0xff ) / 255. )];
}
else if( [code length] == 6 ) { // decode colors like #ffee33
- NSUInteger color = 0;
+ unsigned int color = 0;
scanner = [NSScanner scannerWithString:code];
if( ! [scanner scanHexInt:&color] ) return nil;
return [self colorWithCalibratedRed:( ( ( color >> 16 ) & 0xff ) / 255. ) green:( ( ( color >> 8 ) & 0xff ) / 255. ) blue:( ( color & 0xff ) / 255. ) alpha:1.];
}
else if( [code length] == 3 ) { // decode short-hand colors like #fe3
- NSUInteger color = 0;
+ unsigned int color = 0;
scanner = [NSScanner scannerWithString:code];
if( ! [scanner scanHexInt:&color] ) return nil;
return [self colorWithCalibratedRed:( ( ( ( ( color >> 8 ) & 0xf ) << 4 ) | ( ( color >> 8 ) & 0xf ) ) / 255. ) green:( ( ( ( ( color >> 4 ) & 0xf ) << 4 ) | ( ( color >> 4 ) & 0xf ) ) / 255. ) blue:( ( ( ( color & 0xf ) << 4 ) | ( color & 0xf ) ) / 255. ) alpha:1.];