Use NSIsEmptyRect instead of comparing size to NSZeroSize

This commit is contained in:
Allan Odgaard
2018-11-05 17:47:35 +07:00
parent 477d906399
commit f242bd67e5

View File

@@ -1054,7 +1054,7 @@ static NSMutableIndexSet* MutableLongestCommonSubsequence (NSArray* lhs, NSArray
{
NSButton* imageButton = view.openButton;
NSRect imageRect = NSIntersectionRect([imageButton convertRect:imageButton.bounds toView:nil], [_outlineView convertRect:_outlineView.visibleRect toView:nil]);
return NSEqualSizes(imageRect.size, NSZeroSize) ? NSZeroRect : [self.window convertRectToScreen:imageRect];
return NSIsEmptyRect(imageRect) ? NSZeroRect : [self.window convertRectToScreen:imageRect];
}
}
return NSZeroRect;