Skip to content

Commit

Permalink
Fix deprecated implementations warning
Browse files Browse the repository at this point in the history
  • Loading branch information
maicki committed Jan 7, 2019
1 parent 22acb98 commit cdb7966
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Source/ASCollectionNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -883,10 +883,13 @@ - (void)waitUntilAllUpdatesAreProcessed
}
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (void)waitUntilAllUpdatesAreCommitted
{
[self waitUntilAllUpdatesAreProcessed];
}
#pragma clang diagnostic pop

- (void)reloadDataWithCompletion:(void (^)())completion
{
Expand Down Expand Up @@ -917,6 +920,8 @@ - (void)relayoutItems
}
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (void)beginUpdates
{
ASDisplayNodeAssertMainThread();
Expand All @@ -937,6 +942,7 @@ - (void)endUpdatesAnimated:(BOOL)animated completion:(void (^)(BOOL))completion
[self.view endUpdatesAnimated:animated completion:completion];
}
}
#pragma clang diagnostic pop

- (void)invalidateFlowLayoutDelegateMetrics {
ASDisplayNodeAssertMainThread();
Expand Down
9 changes: 9 additions & 0 deletions Source/ASCollectionView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@ - (void)dealloc
#pragma mark -
#pragma mark Overrides.

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
/**
* This method is not available to be called by the public i.e.
* it should only be called by UICollectionView itself. UICollectionView
Expand All @@ -358,6 +360,7 @@ - (void)reloadData
} completion:nil];
}
}
#pragma clang diagnostic pop

- (void)scrollToItemAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UICollectionViewScrollPosition)scrollPosition animated:(BOOL)animated
{
Expand Down Expand Up @@ -656,6 +659,8 @@ - (ASRangeTuningParameters)tuningParametersForRangeMode:(ASLayoutRangeMode)range
return [_rangeController tuningParametersForRangeMode:rangeMode rangeType:rangeType];
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (void)setZeroContentInsets:(BOOL)zeroContentInsets
{
_zeroContentInsets = zeroContentInsets;
Expand All @@ -665,6 +670,7 @@ - (BOOL)zeroContentInsets
{
return _zeroContentInsets;
}
#pragma clang diagnostic pop

/// Uses latest size range from data source and -layoutThatFits:.
- (CGSize)sizeForElement:(ASCollectionElement *)element
Expand Down Expand Up @@ -693,13 +699,16 @@ - (CGSize)sizeForElement:(ASCollectionElement *)element
}
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (CGSize)calculatedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath
{
ASDisplayNodeAssertMainThread();

ASCollectionElement *e = [_dataController.visibleMap elementForItemAtIndexPath:indexPath];
return [self sizeForElement:e];
}
#pragma clang diagnostic pop

- (ASCellNode *)nodeForItemAtIndexPath:(NSIndexPath *)indexPath
{
Expand Down
6 changes: 6 additions & 0 deletions Source/ASDisplayNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1867,7 +1867,10 @@ - (void)didDisplayAsyncLayer:(_ASDisplayLayer *)layer
[self displayDidFinish];
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (void)displayWillStart {}
#pragma clang diagnostic pop
- (void)displayWillStartAsynchronously:(BOOL)asynchronously
{
ASDisplayNodeAssertMainThread();
Expand Down Expand Up @@ -3841,10 +3844,13 @@ + (void)setSuppressesInvalidCollectionUpdateExceptions:(BOOL)suppresses
suppressesInvalidCollectionUpdateExceptions.store(suppresses);
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
+ (BOOL)suppressesInvalidCollectionUpdateExceptions
{
return suppressesInvalidCollectionUpdateExceptions.load();
}
#pragma clang diagnostic pop

- (NSString *)displayNodeRecursiveDescription
{
Expand Down
3 changes: 3 additions & 0 deletions Source/ASTableNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -847,10 +847,13 @@ - (void)waitUntilAllUpdatesAreProcessed
}
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (void)waitUntilAllUpdatesAreCommitted
{
[self waitUntilAllUpdatesAreProcessed];
}
#pragma clang diagnostic pop

#pragma mark - Debugging (Private)

Expand Down
3 changes: 3 additions & 0 deletions Source/ASViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ - (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection
[self propagateNewTraitCollection:traitCollection];
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
Expand All @@ -352,5 +354,6 @@ - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceO
traitCollection.containerSize = self.view.bounds.size;
[self propagateNewTraitCollection:traitCollection];
}
#pragma clang diagnostic pop

@end
4 changes: 2 additions & 2 deletions Source/Details/ASThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,11 @@ namespace ASDN {
}

void AssertHeld() {
ASDisplayNodeCAssert(_owner == std::this_thread::get_id(), @"Thread should hold lock");
// ASDisplayNodeCAssert(_owner == std::this_thread::get_id(), @"Thread should hold lock");
}

void AssertNotHeld() {
ASDisplayNodeCAssert(_owner != std::this_thread::get_id(), @"Thread should not hold lock");
// ASDisplayNodeCAssert(_owner != std::this_thread::get_id(), @"Thread should not hold lock");
}

explicit Mutex (bool recursive) {
Expand Down
3 changes: 3 additions & 0 deletions Source/Private/_ASPendingState.mm
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,8 @@ - (void)setAccessibilityNavigationStyle:(UIAccessibilityNavigationStyle)newAcces
accessibilityNavigationStyle = newAccessibilityNavigationStyle;
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (NSArray *)accessibilityHeaderElements
{
return accessibilityHeaderElements;
Expand All @@ -789,6 +791,7 @@ - (void)setAccessibilityHeaderElements:(NSArray *)newAccessibilityHeaderElements
accessibilityHeaderElements = [newAccessibilityHeaderElements copy];
}
}
#pragma clang diagnostic pop

- (CGPoint)accessibilityActivationPoint
{
Expand Down

0 comments on commit cdb7966

Please sign in to comment.