From f98bdddd09609b7a42b849279c7c83624090ab4e Mon Sep 17 00:00:00 2001 From: Sven Weidauer Date: Mon, 31 Jan 2011 08:33:16 +0000 Subject: Updated PSMTabBarControl (warning fixes) svn path=/trunk/netsurf/; revision=11560 --- cocoa/PSMTabBarControl/PSMTabBarController.m | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'cocoa/PSMTabBarControl/PSMTabBarController.m') 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]; -- cgit v1.2.3