diff --git a/Source/ASCollectionNode.mm b/Source/ASCollectionNode.mm index bf854b0466..ba31b41ca2 100644 --- a/Source/ASCollectionNode.mm +++ b/Source/ASCollectionNode.mm @@ -820,7 +820,7 @@ [self.view registerSupplementaryNodeOfKind:elementKind]; } -- (void)performBatchAnimated:(BOOL)animated updates:(void (^)())updates completion:(void (^)(BOOL))completion +- (void)performBatchAnimated:(BOOL)animated updates:(NS_NOESCAPE void (^)())updates completion:(void (^)(BOOL))completion { ASDisplayNodeAssertMainThread(); if (self.nodeLoaded) { @@ -835,7 +835,7 @@ } } -- (void)performBatchUpdates:(void (^)())updates completion:(void (^)(BOOL))completion +- (void)performBatchUpdates:(NS_NOESCAPE void (^)())updates completion:(void (^)(BOOL))completion { [self performBatchAnimated:UIView.areAnimationsEnabled updates:updates completion:completion]; } diff --git a/Source/ASCollectionView.mm b/Source/ASCollectionView.mm index 0c36204a0c..62380e4891 100644 --- a/Source/ASCollectionView.mm +++ b/Source/ASCollectionView.mm @@ -921,7 +921,7 @@ static NSString * const kReuseIdentifier = @"_ASCollectionReuseIdentifier"; } } -- (void)performBatchAnimated:(BOOL)animated updates:(void (^)())updates completion:(void (^)(BOOL))completion +- (void)performBatchAnimated:(BOOL)animated updates:(NS_NOESCAPE void (^)())updates completion:(void (^)(BOOL))completion { ASDisplayNodeAssertMainThread(); [self beginUpdates]; @@ -936,7 +936,7 @@ static NSString * const kReuseIdentifier = @"_ASCollectionReuseIdentifier"; [self endUpdatesAnimated:animated completion:completion]; } -- (void)performBatchUpdates:(void (^)())updates completion:(void (^)(BOOL))completion +- (void)performBatchUpdates:(NS_NOESCAPE void (^)())updates completion:(void (^)(BOOL))completion { // We capture the current state of whether animations are enabled if they don't provide us with one. [self performBatchAnimated:[UIView areAnimationsEnabled] updates:updates completion:completion]; diff --git a/Source/ASImageNode.mm b/Source/ASImageNode.mm index f30257a6b9..d5739f1a49 100644 --- a/Source/ASImageNode.mm +++ b/Source/ASImageNode.mm @@ -323,7 +323,7 @@ typedef void (^ASImageNodeDrawParametersBlock)(ASWeakMapEntry *entry); return drawParameters; } -+ (UIImage *)displayWithParameters:(id)parameter isCancelled:(asdisplaynode_iscancelled_block_t)isCancelled ++ (UIImage *)displayWithParameters:(id)parameter isCancelled:(NS_NOESCAPE asdisplaynode_iscancelled_block_t)isCancelled { ASImageNodeDrawParameters *drawParameter = (ASImageNodeDrawParameters *)parameter; diff --git a/Source/ASTableNode.mm b/Source/ASTableNode.mm index cbcb54f77a..4ac85989c6 100644 --- a/Source/ASTableNode.mm +++ b/Source/ASTableNode.mm @@ -729,7 +729,7 @@ ASLayoutElementCollectionTableSetTraitCollection(_environmentStateLock) [self.view relayoutItems]; } -- (void)performBatchAnimated:(BOOL)animated updates:(void (^)())updates completion:(void (^)(BOOL))completion +- (void)performBatchAnimated:(BOOL)animated updates:(NS_NOESCAPE void (^)())updates completion:(void (^)(BOOL))completion { ASDisplayNodeAssertMainThread(); if (self.nodeLoaded) { @@ -746,7 +746,7 @@ ASLayoutElementCollectionTableSetTraitCollection(_environmentStateLock) } } -- (void)performBatchUpdates:(void (^)())updates completion:(void (^)(BOOL))completion +- (void)performBatchUpdates:(NS_NOESCAPE void (^)())updates completion:(void (^)(BOOL))completion { [self performBatchAnimated:YES updates:updates completion:completion]; } diff --git a/Source/ASTextNode.mm b/Source/ASTextNode.mm index 01819de417..1de1117dd9 100644 --- a/Source/ASTextNode.mm +++ b/Source/ASTextNode.mm @@ -501,7 +501,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; textContainerInsets:_textContainerInset]; } -+ (void)drawRect:(CGRect)bounds withParameters:(id)parameters isCancelled:(asdisplaynode_iscancelled_block_t)isCancelledBlock isRasterizing:(BOOL)isRasterizing ++ (void)drawRect:(CGRect)bounds withParameters:(id)parameters isCancelled:(NS_NOESCAPE asdisplaynode_iscancelled_block_t)isCancelledBlock isRasterizing:(BOOL)isRasterizing { ASTextNodeDrawParameter *drawParameter = (ASTextNodeDrawParameter *)parameters; UIColor *backgroundColor = (isRasterizing || drawParameter == nil) ? nil : drawParameter->_backgroundColor; diff --git a/Source/ASTextNode2.mm b/Source/ASTextNode2.mm index 813326bddf..aaa215e672 100644 --- a/Source/ASTextNode2.mm +++ b/Source/ASTextNode2.mm @@ -465,7 +465,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; return layout; } -+ (void)drawRect:(CGRect)bounds withParameters:(NSDictionary *)layoutDict isCancelled:(asdisplaynode_iscancelled_block_t)isCancelledBlock isRasterizing:(BOOL)isRasterizing ++ (void)drawRect:(CGRect)bounds withParameters:(NSDictionary *)layoutDict isCancelled:(NS_NOESCAPE asdisplaynode_iscancelled_block_t)isCancelledBlock isRasterizing:(BOOL)isRasterizing { ASTextContainer *container = layoutDict[@"container"]; NSAttributedString *text = layoutDict[@"text"]; diff --git a/Source/TextKit/ASTextKitContext.mm b/Source/TextKit/ASTextKitContext.mm index 012619c2ec..0995a66f66 100644 --- a/Source/TextKit/ASTextKitContext.mm +++ b/Source/TextKit/ASTextKitContext.mm @@ -62,9 +62,9 @@ return self; } -- (void)performBlockWithLockedTextKitComponents:(void (^)(NSLayoutManager *, - NSTextStorage *, - NSTextContainer *))block +- (void)performBlockWithLockedTextKitComponents:(NS_NOESCAPE void (^)(NSLayoutManager *, + NSTextStorage *, + NSTextContainer *))block { ASDN::MutexSharedLocker l(__instanceLock__); if (block) {