diff options
author | Sven Weidauer <sven.weidauer@gmail.com> | 2011-01-31 08:33:16 +0000 |
---|---|---|
committer | Sven Weidauer <sven.weidauer@gmail.com> | 2011-01-31 08:33:16 +0000 |
commit | f98bdddd09609b7a42b849279c7c83624090ab4e (patch) | |
tree | bf87341dd3c332803a2019b6c86784c7a076ce16 /cocoa/PSMTabBarControl/PSMTabBarController.m | |
parent | 899c2e3305592725d646f5acf3c21eaad13699c7 (diff) | |
download | netsurf-f98bdddd09609b7a42b849279c7c83624090ab4e.tar.gz netsurf-f98bdddd09609b7a42b849279c7c83624090ab4e.tar.bz2 |
Updated PSMTabBarControl (warning fixes)
svn path=/trunk/netsurf/; revision=11560
Diffstat (limited to 'cocoa/PSMTabBarControl/PSMTabBarController.m')
-rw-r--r-- | cocoa/PSMTabBarControl/PSMTabBarController.m | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cocoa/PSMTabBarControl/PSMTabBarController.m b/cocoa/PSMTabBarControl/PSMTabBarController.m index 7d9820e61..68e1bc498 100644 --- a/cocoa/PSMTabBarControl/PSMTabBarController.m +++ b/cocoa/PSMTabBarControl/PSMTabBarController.m @@ -78,9 +78,9 @@ @returns The tracking rect of the cell at the requested index. */ -- (NSRect)cellTrackingRectAtIndex:(NSInteger)index { +- (NSRect)cellTrackingRectAtIndex:(NSUInteger)index { NSRect rect; - if(index > -1 && index < [_cellTrackingRects count]) { + if(index < [_cellTrackingRects count]) { rect = [[_cellTrackingRects objectAtIndex:index] rectValue]; } else { NSLog(@"cellTrackingRectAtIndex: Invalid index (%ld)", (long)index); @@ -97,9 +97,9 @@ @returns The close button tracking rect of the cell at the requested index. */ -- (NSRect)closeButtonTrackingRectAtIndex:(NSInteger)index { +- (NSRect)closeButtonTrackingRectAtIndex:(NSUInteger)index { NSRect rect; - if(index > -1 && index < [_closeButtonTrackingRects count]) { + if(index < [_closeButtonTrackingRects count]) { rect = [[_closeButtonTrackingRects objectAtIndex:index] rectValue]; } else { NSLog(@"closeButtonTrackingRectAtIndex: Invalid index (%ld)", (long)index); @@ -116,10 +116,10 @@ @returns The frame of the cell at the requested index. */ -- (NSRect)cellFrameAtIndex:(NSInteger)index { +- (NSRect)cellFrameAtIndex:(NSUInteger)index { NSRect rect; - if(index > -1 && index < [_cellFrames count]) { + if(index < [_cellFrames count]) { rect = [[_cellFrames objectAtIndex:index] rectValue]; } else { NSLog(@"cellFrameAtIndex: Invalid index (%ld)", (long)index); @@ -160,7 +160,7 @@ [cell setTabState:PSMTab_SelectedMask]; if(![cell isInOverflowMenu]) { - NSInteger cellIndex = [cells indexOfObject:cell]; + NSUInteger cellIndex = [cells indexOfObject:cell]; if(cellIndex > 0) { nextCell = [cells objectAtIndex:cellIndex - 1]; @@ -501,7 +501,7 @@ static NSInteger potentialMinimumForArray(NSArray *array, NSInteger minimum){ */ - (void)_setupCells:(NSArray *)cells withWidths:(NSArray *)widths { - NSInteger i, tabState, cellCount = [cells count]; + NSUInteger i, tabState, cellCount = [cells count]; NSRect cellRect = [_control genericCellRect]; PSMTabBarCell *cell; NSTabViewItem *selectedTabViewItem = [[_control tabView] selectedTabViewItem]; |