Permalink
Browse files

silence integer conversion warnings

  • Loading branch information...
1 parent 6b7e9d3 commit 580dcc6abc6987f4269c769c185cb5e2e1a7a965 @martinh martinh committed Jun 13, 2011
Showing with 5 additions and 5 deletions.
  1. +5 −5 app/PSMTabDragAssistant.m
View
@@ -135,7 +135,7 @@ - (void)startDraggingCell:(PSMTabBarCell *)cell fromTabBar:(PSMTabBarControl *)c
[self setDestinationTabBar:control];
[_participatingTabBars addObject:control];
[self setDraggedCell:cell];
- [self setDraggedCellIndex:[[control cells] indexOfObject:cell]];
+ [self setDraggedCellIndex:(int)[[control cells] indexOfObject:cell]];
NSRect cellFrame = [cell frame];
// list of widths for animation
@@ -164,7 +164,7 @@ - (void)startDraggingCell:(PSMTabBarCell *)cell fromTabBar:(PSMTabBarControl *)c
[cell setHighlighted:NO];
NSSize offset = NSZeroSize;
[pboard declareTypes:[NSArray arrayWithObjects:@"PSMTabBarControlItemPBType", nil] owner: nil];
- [pboard setString:[[NSNumber numberWithInt:[[control cells] indexOfObject:cell]] stringValue] forType:@"PSMTabBarControlItemPBType"];
+ [pboard setString:[[NSNumber numberWithInteger:[[control cells] indexOfObject:cell]] stringValue] forType:@"PSMTabBarControlItemPBType"];
_animationTimer = [NSTimer scheduledTimerWithTimeInterval:(1.0/30.0) target:self selector:@selector(animateDrag:) userInfo:nil repeats:YES];
[control dragImage:dragImage at:cellFrame.origin offset:offset event:event pasteboard:pboard source:control slideBack:YES];
}
@@ -247,7 +247,7 @@ - (void)calculateDragAnimationForTabBar:(PSMTabBarControl *)control
{
BOOL removeFlag = YES;
NSMutableArray *cells = [control cells];
- int i, cellCount = [cells count];
+ int i, cellCount = (int)[cells count];
float xPos = [[control style] leftMarginForTabBarControl];
// identify target cell
@@ -327,7 +327,7 @@ - (void)distributePlaceholdersInTabBar:(PSMTabBarControl *)control withDraggedCe
// called upon first drag - must distribute placeholders
[self distributePlaceholdersInTabBar:control];
// replace dragged cell with a placeholder, and clean up surrounding cells
- int cellIndex = [[control cells] indexOfObject:cell];
+ int cellIndex = (int)[[control cells] indexOfObject:cell];
PSMTabBarCell *pc = [[[PSMTabBarCell alloc] initPlaceholderWithFrame:[[self draggedCell] frame] expanded:YES inControlView:control] autorelease];
[[control cells] replaceObjectAtIndex:cellIndex withObject:pc];
[[control cells] removeObjectAtIndex:(cellIndex + 1)];
@@ -354,7 +354,7 @@ - (void)distributePlaceholdersInTabBar:(PSMTabBarControl *)control
- (void)removeAllPlaceholdersFromTabBar:(PSMTabBarControl *)control
{
- int i, cellCount = [[control cells] count];
+ int i, cellCount = (int)[[control cells] count];
for(i = (cellCount - 1); i >= 0; i--){
PSMTabBarCell *cell = [[control cells] objectAtIndex:i];
if([cell isPlaceholder])

0 comments on commit 580dcc6

Please sign in to comment.