Fix Pinterest Xcode 7.3.1 Analyzer Warnings (#1988)

This commit is contained in:
Hannah Troisi
2016-07-27 08:23:16 -07:00
committed by Adlai Holler
parent aeec0b1a14
commit f5b3a282af
6 changed files with 16 additions and 13 deletions

View File

@@ -704,18 +704,19 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
- (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset
{
CGPoint contentOffset = scrollView.contentOffset;
_deceleratingVelocity = CGPointMake(
scrollView.contentOffset.x - ((targetContentOffset != NULL) ? targetContentOffset->x : 0),
scrollView.contentOffset.y - ((targetContentOffset != NULL) ? targetContentOffset->y : 0)
contentOffset.x - ((targetContentOffset != NULL) ? targetContentOffset->x : 0),
contentOffset.y - ((targetContentOffset != NULL) ? targetContentOffset->y : 0)
);
if (targetContentOffset != NULL) {
ASDisplayNodeAssert(_batchContext != nil, @"Batch context should exist");
[self _beginBatchFetchingIfNeededWithScrollView:self forScrollDirection:[self scrollDirection] contentOffset:*targetContentOffset];
}
if (_asyncDelegateFlags.asyncDelegateScrollViewWillEndDraggingWithVelocityTargetContentOffset) {
[_asyncDelegate scrollViewWillEndDragging:scrollView withVelocity:velocity targetContentOffset:targetContentOffset];
[_asyncDelegate scrollViewWillEndDragging:scrollView withVelocity:velocity targetContentOffset:(targetContentOffset ? : &contentOffset)];
}
}