mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Fix Pinterest Xcode 7.3.1 Analyzer Warnings (#1988)
This commit is contained in:
committed by
Adlai Holler
parent
aeec0b1a14
commit
f5b3a282af
@@ -120,7 +120,7 @@ typedef NS_ENUM(NSUInteger, ASCellNodeVisibilityEvent) {
|
||||
*/
|
||||
- (instancetype)initWithViewControllerBlock:(ASDisplayNodeViewControllerBlock)viewControllerBlock didLoadBlock:(nullable ASDisplayNodeDidLoadBlock)didLoadBlock;
|
||||
|
||||
- (void)cellNodeVisibilityEvent:(ASCellNodeVisibilityEvent)event inScrollView:(UIScrollView *)scrollView withCellFrame:(CGRect)cellFrame;
|
||||
- (void)cellNodeVisibilityEvent:(ASCellNodeVisibilityEvent)event inScrollView:(nullable UIScrollView *)scrollView withCellFrame:(CGRect)cellFrame;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -721,9 +721,10 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell";
|
||||
|
||||
- (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) {
|
||||
@@ -732,7 +733,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell";
|
||||
}
|
||||
|
||||
if (_asyncDelegateFlags.asyncDelegateScrollViewWillEndDraggingWithVelocityTargetContentOffset) {
|
||||
[_asyncDelegate scrollViewWillEndDragging:scrollView withVelocity:velocity targetContentOffset:targetContentOffset];
|
||||
[_asyncDelegate scrollViewWillEndDragging:scrollView withVelocity:velocity targetContentOffset:(targetContentOffset ? : &contentOffset)];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2071,7 +2071,8 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock)
|
||||
return _layoutSpecBlock(self, constrainedSize);
|
||||
}
|
||||
|
||||
return nil;
|
||||
ASDisplayNodeAssert(NO, @"-[ASDisplayNode layoutSpecThatFits:] should never fall through to return empty value");
|
||||
return [[ASLayoutSpec alloc] init];
|
||||
}
|
||||
|
||||
- (ASLayout *)calculatedLayout
|
||||
|
||||
@@ -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)];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,14 +48,14 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*
|
||||
* @discussion A great time to update perform selector caches!
|
||||
*/
|
||||
- (void)didChangeCollectionViewDelegate:(id<ASCollectionDelegate>)delegate;
|
||||
- (void)didChangeCollectionViewDelegate:(nullable id<ASCollectionDelegate>)delegate;
|
||||
|
||||
/**
|
||||
* Allow the inspector to respond to dataSource changes.
|
||||
*
|
||||
* @discussion A great time to update perform selector caches!
|
||||
*/
|
||||
- (void)didChangeCollectionViewDataSource:(id<ASCollectionDataSource>)dataSource;
|
||||
- (void)didChangeCollectionViewDataSource:(nullable id<ASCollectionDataSource>)dataSource;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol ASImageContainerProtocol <NSObject>
|
||||
|
||||
- (UIImage *)asdk_image;
|
||||
- (NSData *)asdk_animatedImageData;
|
||||
- (nullable UIImage *)asdk_image;
|
||||
- (nullable NSData *)asdk_animatedImageData;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user