Skip to content
Snippets Groups Projects
Commit 4ccc75c8 authored by Lucas Jenss's avatar Lucas Jenss
Browse files

Fix compiler warnings and make the code a bit clearer

The warnings are generated because GCC 4.2 didn't know of which type the
object from the array was, and it guessed that it was some object which
returns an NSString *, which cannot be cast to PTYTab * without warning.
parent b6bbbfb0
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -482,7 +482,8 @@ NSString *sessionsKey = @"sessions";
{
NSArray* items = [TABVIEW tabViewItems];
for (int i = 0; i < [items count]; i++) {
if ([[items objectAtIndex:i] identifier] == aTab) {
NSTabViewItem *tabViewItem = [items objectAtIndex:i];
if ([tabViewItem identifier] == aTab) {
return i;
}
}
Loading
Loading
@@ -2216,7 +2217,10 @@ NSString *sessionsKey = @"sessions";
([[PreferencePanel sharedInstance] hideTab] && ([TABVIEW numberOfTabViewItems] > 1 && [tabBarControl isHidden]))) {
// Need to change the visibility status of the tab bar control.
PtyLog(@"tabViewDidChangeNumberOfTabViewItems - calling fitWindowToTab");
PTYTab* firstTab = [[[TABVIEW tabViewItems] objectAtIndex:0] identifier];
NSTabViewItem *tabViewItem = [[TABVIEW tabViewItems] objectAtIndex:0];
PTYTab *firstTab = [tabViewItem identifier];
if (wasDraggedFromAnotherWindow_) {
// A tab was just dragged out of another window's tabbar into its own window.
// When this happens, it loses its size. This is our only chance to resize it.
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment