diff --git a/Source/ASCollectionNode.mm b/Source/ASCollectionNode.mm index bf854b046..ba31b41ca 100644 --- a/Source/ASCollectionNode.mm +++ b/Source/ASCollectionNode.mm @@ -820,7 +820,7 @@ - (void)registerSupplementaryNodeOfKind:(NSString *)elementKind [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)performBatchAnimated:(BOOL)animated updates:(void (^)())updates completi } } -- (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 94406b0ee..794be15bb 100644 --- a/Source/ASCollectionView.mm +++ b/Source/ASCollectionView.mm @@ -921,7 +921,7 @@ - (void)endUpdatesAnimated:(BOOL)animated completion:(nullable void (^)(BOOL))co } } -- (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 @@ - (void)performBatchAnimated:(BOOL)animated updates:(void (^)())updates completi [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 f30257a6b..d5739f1a4 100644 --- a/Source/ASImageNode.mm +++ b/Source/ASImageNode.mm @@ -323,7 +323,7 @@ - (NSObject *)drawParametersForAsyncLayer:(_ASDisplayLayer *)layer 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 cbcb54f77..4ac85989c 100644 --- a/Source/ASTableNode.mm +++ b/Source/ASTableNode.mm @@ -729,7 +729,7 @@ - (void)relayoutItems [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 @@ - (void)performBatchAnimated:(BOOL)animated updates:(void (^)())updates completi } } -- (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 01819de41..1de1117dd 100644 --- a/Source/ASTextNode.mm +++ b/Source/ASTextNode.mm @@ -501,7 +501,7 @@ - (NSObject *)drawParametersForAsyncLayer:(_ASDisplayLayer *)layer 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 813326bdd..aaa215e67 100644 --- a/Source/ASTextNode2.mm +++ b/Source/ASTextNode2.mm @@ -465,7 +465,7 @@ + (ASTextLayout *)compatibleLayoutWithContainer:(ASTextContainer *)container 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 012619c2e..0995a66f6 100644 --- a/Source/TextKit/ASTextKitContext.mm +++ b/Source/TextKit/ASTextKitContext.mm @@ -62,9 +62,9 @@ - (instancetype)initWithAttributedString:(NSAttributedString *)attributedString return self; } -- (void)performBlockWithLockedTextKitComponents:(void (^)(NSLayoutManager *, - NSTextStorage *, - NSTextContainer *))block +- (void)performBlockWithLockedTextKitComponents:(NS_NOESCAPE void (^)(NSLayoutManager *, + NSTextStorage *, + NSTextContainer *))block { ASDN::MutexSharedLocker l(__instanceLock__); if (block) {