Skip to content

Commit dae198d

Browse files
Merge pull request #23 from stephanheilner/master
Fixed declaration shadows a local variable warnings/compile errors by stephanheilner
2 parents f6cab02 + 2a4c5e5 commit dae198d

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

WYPopoverController/WYPopoverController.m

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,7 +1919,7 @@ - (WYPopoverArrowDirection)arrowDirectionForRect:(CGRect)aRect
19191919
arrowHeight:(CGFloat)arrowHeight
19201920
permittedArrowDirections:(WYPopoverArrowDirection)arrowDirections
19211921
{
1922-
WYPopoverArrowDirection result = WYPopoverArrowDirectionUnknown;
1922+
WYPopoverArrowDirection arrowDirection = WYPopoverArrowDirectionUnknown;
19231923

19241924
NSMutableArray* areas = [NSMutableArray arrayWithCapacity:0];
19251925
WYPopoverArea* area;
@@ -1959,9 +1959,9 @@ - (WYPopoverArrowDirection)arrowDirectionForRect:(CGRect)aRect
19591959
if ([areas count] > 1)
19601960
{
19611961
NSIndexSet* indexes = [areas indexesOfObjectsPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) {
1962-
WYPopoverArea* area = (WYPopoverArea*)obj;
1962+
WYPopoverArea* popoverArea = (WYPopoverArea*)obj;
19631963

1964-
BOOL result = (area.areaSize.width > 0 && area.areaSize.height > 0);
1964+
BOOL result = (popoverArea.areaSize.width > 0 && popoverArea.areaSize.height > 0);
19651965

19661966
return result;
19671967
}];
@@ -1992,21 +1992,21 @@ - (WYPopoverArrowDirection)arrowDirectionForRect:(CGRect)aRect
19921992

19931993
for (NSUInteger i = 0; i < [areas count]; i++)
19941994
{
1995-
WYPopoverArea* area = (WYPopoverArea*)[areas objectAtIndex:i];
1995+
WYPopoverArea* popoverArea = (WYPopoverArea*)[areas objectAtIndex:i];
19961996

1997-
if (area.areaSize.width >= contentSize.width)
1997+
if (popoverArea.areaSize.width >= contentSize.width)
19981998
{
1999-
result = area.arrowDirection;
1999+
arrowDirection = popoverArea.arrowDirection;
20002000
break;
20012001
}
20022002
}
20032003

2004-
if (result == WYPopoverArrowDirectionUnknown)
2004+
if (arrowDirection == WYPopoverArrowDirectionUnknown)
20052005
{
2006-
result = ((WYPopoverArea*)[areas objectAtIndex:0]).arrowDirection;
2006+
arrowDirection = ((WYPopoverArea*)[areas objectAtIndex:0]).arrowDirection;
20072007
}
20082008

2009-
return result;
2009+
return arrowDirection;
20102010
}
20112011

20122012
- (CGSize)sizeForRect:(CGRect)aRect

0 commit comments

Comments
 (0)