diff options
author | Sven Weidauer <sven.weidauer@gmail.com> | 2011-01-23 19:32:56 +0000 |
---|---|---|
committer | Sven Weidauer <sven.weidauer@gmail.com> | 2011-01-23 19:32:56 +0000 |
commit | dd1e7b893ba5a4b796c848d751f7c73872a47cdb (patch) | |
tree | cd945f62ae69c5f7844617bf215a2ca6f2ceb027 /cocoa/PSMTabBarControl | |
parent | f9ad37983008cef312e1bcab78d8f92c6ecf1ec3 (diff) | |
download | netsurf-dd1e7b893ba5a4b796c848d751f7c73872a47cdb.tar.gz netsurf-dd1e7b893ba5a4b796c848d751f7c73872a47cdb.tar.bz2 |
Activating (and fixing) more warnings in Xcode
svn path=/trunk/netsurf/; revision=11469
Diffstat (limited to 'cocoa/PSMTabBarControl')
-rw-r--r-- | cocoa/PSMTabBarControl/PSMOverflowPopUpButton.m | 2 | ||||
-rw-r--r-- | cocoa/PSMTabBarControl/PSMTabBarControl.m | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/cocoa/PSMTabBarControl/PSMOverflowPopUpButton.m b/cocoa/PSMTabBarControl/PSMOverflowPopUpButton.m index cc96b910f..4ac70451b 100644 --- a/cocoa/PSMTabBarControl/PSMOverflowPopUpButton.m +++ b/cocoa/PSMTabBarControl/PSMOverflowPopUpButton.m @@ -16,7 +16,7 @@ - (id)initWithFrame:(NSRect)frameRect pullsDown:(BOOL)flag { - if (self = [super initWithFrame:frameRect pullsDown:YES]) { + if ((self = [super initWithFrame:frameRect pullsDown:YES]) != nil) { [self setBezelStyle:NSRegularSquareBezelStyle]; [self setBordered:NO]; [self setTitle:@""]; diff --git a/cocoa/PSMTabBarControl/PSMTabBarControl.m b/cocoa/PSMTabBarControl/PSMTabBarControl.m index 8d1abe122..3c7271b40 100644 --- a/cocoa/PSMTabBarControl/PSMTabBarControl.m +++ b/cocoa/PSMTabBarControl/PSMTabBarControl.m @@ -1002,7 +1002,7 @@ if (animate) { NSMutableArray *targetFrames = [NSMutableArray arrayWithCapacity:[_cells count]]; - for (NSInteger i = 0; i < [_cells count]; i++) { + for (NSUInteger i = 0; i < [_cells count]; i++) { currentCell = [_cells objectAtIndex:i]; //we're going from NSRect -> NSValue -> NSRect -> NSValue here - oh well @@ -1024,7 +1024,7 @@ [self _animateCells:_animationTimer]; } else { - for (NSInteger i = 0; i < [_cells count]; i++) { + for (NSUInteger i = 0; i < [_cells count]; i++) { currentCell = [_cells objectAtIndex:i]; [currentCell setFrame:[_controller cellFrameAtIndex:i]]; @@ -1048,7 +1048,7 @@ if ((cellCount > 0) && [animation isAnimating]) { //compare our target position with the current position and move towards the target - for (NSInteger i = 0; i < [targetFrames count] && i < cellCount; i++) { + for (NSUInteger i = 0; i < [targetFrames count] && i < cellCount; i++) { currentCell = [_cells objectAtIndex:i]; NSRect cellFrame = [currentCell frame], targetFrame = [[targetFrames objectAtIndex:i] rectValue]; CGFloat sizeChange; @@ -1084,7 +1084,7 @@ } else { //put all the cells where they should be in their final position if (cellCount > 0) { - for (NSInteger i = 0; i < [targetFrames count] && i < cellCount; i++) { + for (NSUInteger i = 0; i < [targetFrames count] && i < cellCount; i++) { PSMTabBarCell *currentCell = [_cells objectAtIndex:i]; NSRect cellFrame = [currentCell frame], targetFrame = [[targetFrames objectAtIndex:i] rectValue]; @@ -2026,10 +2026,10 @@ - (NSInteger)numberOfVisibleTabs { - NSInteger i, cellCount = 0; + NSInteger cellCount = 0; PSMTabBarCell *nextCell; - for (i = 0; i < [_cells count]; i++) { + for (NSUInteger i = 0; i < [_cells count]; i++) { nextCell = [_cells objectAtIndex:i]; if ([nextCell isInOverflowMenu]) { |