aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPActivityTextFieldCell.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-03-04 00:38:30 +0000
committerrowanbeentje <rowan@beent.je>2011-03-04 00:38:30 +0000
commit994756398decf77738afb3c599d4cb9238c77cee (patch)
tree6fef724448931d438e553d98096a8f20cbf6751b /Source/SPActivityTextFieldCell.m
parent6f983024a66ddb594eac5e4e808a8c3c51f6b6ff (diff)
downloadsequelpro-994756398decf77738afb3c599d4cb9238c77cee.tar.gz
sequelpro-994756398decf77738afb3c599d4cb9238c77cee.tar.bz2
sequelpro-994756398decf77738afb3c599d4cb9238c77cee.zip
- Fix more compiler warnings
Diffstat (limited to 'Source/SPActivityTextFieldCell.m')
-rw-r--r--Source/SPActivityTextFieldCell.m18
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/SPActivityTextFieldCell.m b/Source/SPActivityTextFieldCell.m
index 6e4e142d..10194466 100644
--- a/Source/SPActivityTextFieldCell.m
+++ b/Source/SPActivityTextFieldCell.m
@@ -26,7 +26,7 @@
#import "SPActivityTextFieldCell.h"
#import "SPTableInfo.h"
-#define FAVORITE_NAME_FONT_SIZE 12.0
+#define FAVORITE_NAME_FONT_SIZE 12.0f
@interface SPActivityTextFieldCell (PrivateAPI)
@@ -121,21 +121,21 @@ static inline NSRect SPTextLinkRectFromCellRect(NSRect inRect)
NSAttributedString *mainString = [self attributedStringForFavoriteName];
NSAttributedString *subString = [self constructSubStringAttributedString];
- NSRect subFrame = NSMakeRect(0.0, 0.0, [subString size].width, [subString size].height);
+ NSRect subFrame = NSMakeRect(0.0f, 0.0f, [subString size].width, [subString size].height);
// Total height of both strings with a 2 pixel separation space
- CGFloat totalHeight = [mainString size].height + [subString size].height + 1.0;
+ CGFloat totalHeight = [mainString size].height + [subString size].height + 1.0f;
- cellFrame.origin.y += (cellFrame.size.height - totalHeight) / 2.0;
- cellFrame.origin.x += 10.0; // Indent main string from image
+ cellFrame.origin.y += (cellFrame.size.height - totalHeight) / 2.0f;
+ cellFrame.origin.x += 10.0f; // Indent main string from image
// Position the sub text's frame rect
- subFrame.origin.y = [mainString size].height + cellFrame.origin.y + 1.0;
+ subFrame.origin.y = [mainString size].height + cellFrame.origin.y + 1.0f;
subFrame.origin.x = cellFrame.origin.x;
cellFrame.size.height = totalHeight;
- NSInteger i;
+ NSUInteger i;
CGFloat maxWidth = cellFrame.size.width - 30;
CGFloat mainStringWidth = [mainString size].width;
CGFloat subStringWidth = [subString size].width;
@@ -289,10 +289,10 @@ static inline NSRect SPTextLinkRectFromCellRect(NSRect inRect)
// 15 := indention 10 from image to string plus 5 px padding
CGFloat theWidth = MAX([mainString size].width, [subString size].width) + (([self image] != nil) ? [[self image] size].width : 0) + 15;
- CGFloat totalHeight = [mainString size].height + [subString size].height + 1.0;
+ CGFloat totalHeight = [mainString size].height + [subString size].height + 1.0f;
cellSize.width = theWidth;
- cellSize.height = totalHeight + 13.0;
+ cellSize.height = totalHeight + 13.0f;
return cellSize;
}