Skip to content

Commit

Permalink
Fix build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
johankool committed Feb 26, 2015
1 parent 5316d9b commit 58652e5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions WYPopoverController/WYPopoverController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1691,7 +1691,7 @@ - (CGSize)topViewControllerContentSize {

UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];

result = CGSizeMake(320, UIDeviceOrientationIsLandscape(orientation) ? windowSize.width : windowSize.height);
result = CGSizeMake(320, UIInterfaceOrientationIsLandscape(orientation) ? windowSize.width : windowSize.height);
}

return result;
Expand Down Expand Up @@ -1991,7 +1991,7 @@ - (CGAffineTransform)transformForArrowDirection:(WYPopoverArrowDirection)arrowDi
CGSize containerViewSize = _backgroundView.frame.size;

if (_backgroundView.arrowHeight > 0) {
if (UIDeviceOrientationIsLandscape(orientation)) {
if (UIInterfaceOrientationIsLandscape(orientation)) {
containerViewSize.width = _backgroundView.frame.size.height;
containerViewSize.height = _backgroundView.frame.size.width;
}
Expand Down Expand Up @@ -2860,13 +2860,16 @@ - (void)didChangeDeviceOrientation:(NSNotification *)notification {

[_delegate popoverController:self willRepositionPopoverToRect:&anotherRect inView:&anotherInView];

#pragma clang diagnostic push
#pragma GCC diagnostic ignored "-Wtautological-pointer-compare"
if (&anotherRect != NULL) {
_rect = anotherRect;
}

if (&anotherInView != NULL) {
_inView = anotherInView;
}
#pragma GCC diagnostic pop
}

[self positionPopover:NO];
Expand Down

0 comments on commit 58652e5

Please sign in to comment.