Permalink
Browse files

Unnecessary globals

  • Loading branch information...
1 parent f6bdf06 commit 6ede1ccb04c81c32ce18a841af95819b01a7d8c7 @BlairDuncan BlairDuncan committed Apr 10, 2012
View
@@ -122,6 +122,7 @@ ACTUAL_FRAME_RATE = 0;
*/
- (void)setAnimationCurve:(CPAnimationCurve)anAnimationCurve
{
+ var timingFunctionName;
switch (anAnimationCurve)
{
case CPAnimationEaseInOut: timingFunctionName = kCAMediaTimingFunctionEaseInEaseOut;
@@ -148,10 +148,8 @@ var SelectionColor = nil,
[_submenuIndicatorView setFrame:submenuViewFrame];
}
- _minSize = CGSizeMake(x + HORIZONTAL_MARGIN, height);
-
[self setAutoresizesSubviews:NO];
- [self setFrameSize:_minSize];
+ [self setFrameSize:CGSizeMake(x + HORIZONTAL_MARGIN, height)];
[self setAutoresizesSubviews:YES];
}
View
@@ -151,7 +151,6 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0,
_retargedChildIndex = nil;
_shouldRetargetChildIndex = NO;
- _startHoverTime = nil;
[self setIndentationPerLevel:16.0];
[self setIndentationMarkerFollowsDataView:YES];
@@ -345,7 +345,8 @@
{
var rootRowsArray = [super _rootRowsArray],
subpredicates = [CPMutableArray array],
- count = count2 = [rootRowsArray count],
+ count,
+ count2 = count = [rootRowsArray count],
predicate;
while (count--)
View
@@ -321,7 +321,6 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
*/
- (void)_init
{
- _tableViewFlags = 0;
_lastSelectedRow = -1;
_selectedColumnIndexes = [CPIndexSet indexSet];
@@ -335,15 +334,12 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
if (!_alternatingRowBackgroundColors)
_alternatingRowBackgroundColors = [[CPColor whiteColor], [CPColor colorWithHexString:@"e4e7ff"]];
- _selectionHighlightColor = [CPColor colorWithHexString:@"5f83b9"];
-
_tableColumnRanges = [];
_dirtyTableColumnRangeIndex = 0;
_numberOfHiddenColumns = 0;
_objectValues = { };
_dataViewsForTableColumns = { };
- _dataViews = [];
_numberOfRows = 0;
_exposedRows = [CPIndexSet indexSet];
_exposedColumns = [CPIndexSet indexSet];
@@ -3696,7 +3692,8 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
[_selectedColumnIndexes getIndexes:indexes maxCount:-1 inIndexRange:exposedRange];
}
- var count = count2 = [indexes count];
+ var count,
+ count2 = count == [indexes count];
if (!count)
return;
@@ -4852,9 +4849,8 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey",
while (index != CPNotFound)
{
- var indexSet = (switchFlag) ? otherSet : self;
-
- otherIndex = [indexSet indexGreaterThanOrEqualToIndex:index];
+ var indexSet = (switchFlag) ? otherSet : self,
+ otherIndex = [indexSet indexGreaterThanOrEqualToIndex:index];
if (otherIndex == index)
{
@@ -105,7 +105,7 @@ var HUD_TITLEBAR_HEIGHT = 26.0;
if ([[[self window] toolbar] isVisible])
{
- toolbarHeight = CGRectGetHeight([[self toolbarView] frame]);
+ var toolbarHeight = CGRectGetHeight([[self toolbarView] frame]);
frameRect.origin.y -= toolbarHeight;
frameRect.size.height += toolbarHeight;
@@ -197,7 +197,7 @@ var STANDARD_GRADIENT_HEIGHT = 41.0,
if ([theToolbar isVisible])
{
- toolbarHeight = CGRectGetHeight([[theToolbar _toolbarView] frame]);
+ var toolbarHeight = CGRectGetHeight([[theToolbar _toolbarView] frame]);
frameRect.origin.y -= toolbarHeight;
frameRect.size.height += toolbarHeight;
@@ -522,7 +522,7 @@ var concat = Array.prototype.concat,
if ([objects count])
{
- argumentsArray = [[nil, aSelector] arrayByAddingObjectsFromArray:objects];
+ var argumentsArray = [[nil, aSelector] arrayByAddingObjectsFromArray:objects];
for (; index < count; ++index)
{
@@ -163,7 +163,7 @@ var concat = Array.prototype.concat,
if ([objects count])
{
- argumentsArray = [[nil, aSelector] arrayByAddingObjectsFromArray:objects];
+ var argumentsArray = [[nil, aSelector] arrayByAddingObjectsFromArray:objects];
for (; index < count; ++index)
{

0 comments on commit 6ede1cc

Please sign in to comment.