summaryrefslogtreecommitdiff
path: root/cocoa/PSMTabBarControl
diff options
context:
space:
mode:
Diffstat (limited to 'cocoa/PSMTabBarControl')
-rw-r--r--cocoa/PSMTabBarControl/PSMOverflowPopUpButton.m2
-rw-r--r--cocoa/PSMTabBarControl/PSMTabBarControl.m12
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]) {